SmartAPI
Open Source .NET RQL library for RedDot CMS / OpenText WSM Management Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Pages
IAttribute.cs
Go to the documentation of this file.
1 ï»¿// SmartAPI - .Net programmatic access to RedDot servers
2 //
3 // Copyright (C) 2013 erminas GbR
4 //
5 // This program is free software: you can redistribute it and/or modify it
6 // under the terms of the GNU General Public License as published by the Free Software Foundation,
7 // either version 3 of the License, or (at your option) any later version.
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11 // See the GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License along with this program.
14 // If not, see <http://www.gnu.org/licenses/>.
15 
16 using System.Xml;
17 using erminas.SmartAPI.CMS.Converter;
18 
19 namespace erminas.SmartAPI.CMS.Project.ContentClasses.Elements
20 {
21  public interface IAttribute : IContentClassElement
22  {
24  FileSizeUnit FileSizeUnit { get; set; }
25  ISystemLocale Locale { get; set; }
26  string ReferencedElementName { get; set; }
27  MediaTypeAttributeType SelectedAttributeType { get; set; }
28  }
29 
30  internal class Attribute : ContentClassElement, IAttribute
31  {
32  internal Attribute(IContentClass contentClass, XmlElement xmlElement) : base(contentClass, xmlElement)
33  {
34  }
35 
36  public override ContentClassCategory Category
37  {
38  get { return ContentClassCategory.Meta; }
39  }
40 
41  [RedDot("eltformatno", ConverterType = typeof (DateTimeFormatConverter))]
42  public IDateTimeFormat DateTimeFormat
43  {
44  get { return GetAttributeValue<IDateTimeFormat>(); }
45  set { SetAttributeValue(value); }
46  }
47 
48  [RedDot("eltformatting", ConverterType = typeof (StringEnumConverter<FileSizeUnit>))]
50  {
51  get { return GetAttributeValue<FileSizeUnit>(); }
52  set { SetAttributeValue(value); }
53  }
54 
55  [RedDot("eltlcid", ConverterType = typeof (LocaleConverter))]
56  public ISystemLocale Locale
57  {
58  get { return GetAttributeValue<ISystemLocale>(); }
59  set { SetAttributeValue(value); }
60  }
61 
62  [RedDot("eltmediatypename")]
63  public string ReferencedElementName
64  {
65  get { return GetAttributeValue<string>(); }
66  set { SetAttributeValue(value); }
67  }
68 
69  [RedDot("eltmediatypeattribute", ConverterType = typeof (EnumConverter<MediaTypeAttributeType>))]
70  public MediaTypeAttributeType SelectedAttributeType
71  {
72  get { return GetAttributeValue<MediaTypeAttributeType>(); }
73  set { SetAttributeValue(value); }
74  }
75  }
76 
77  // ReSharper disable InconsistentNaming
79  {
80  None = 0,
81  Application_name_OFFICE = 23,
82  Author_OFFICE = 4,
83  Author_PDF = 50,
84  Bytes_OFFICE = 34,
85  Category_OFFICE = 30,
86  Changed_on_PDF = 48,
87  Characters_OFFICE = 29,
88  Characters_with_spaces_OFFICE = 41,
89  Color_depth_IMG = 11,
90  Comments_OFFICE = 16,
91  Company_OFFICE = 33,
92  Created_on_PDF = 3,
93  Created_with_PDF = 46,
94  Encrypted_PDF = 18,
95  Entry_date = 7,
96  File_name = 1,
97  File_size = 2,
98  Format_OFFICE = 31,
99  Height_IMG = 9,
100  Hidden_slides_OFFICE = 39,
101  Keywords_PDF = 45,
102  Last_editor = 6,
103  Linearized_PDF = 19,
104  Lines_OFFICE = 35,
105  Manager_OFFICE = 32,
106  Modification_date = 5,
107  Multimedia_clips_OFFICE = 40,
108  Notes_OFFICE = 38,
109  Number_of_pages_PDF = 27,
110  Original_author = 8,
111  Paragraphs_OFFICE = 36,
112  Revision_number_OFFICE = 22,
113  Slides_OFFICE = 37,
114  Subject_OFFICE = 20,
115  Template_OFFICE = 21,
116  Thumbnail_100x100 = 44,
117  Thumbnail_50x50 = 43,
118  Title_OFFICE = 12,
119  Total_editing_time_OFFICE = 26,
120  Width_IMG = 10,
121  Words_OFFICE = 28,
122  }
123 
124  // ReSharper restore InconsistentNaming
125 }