SmartAPI
Open Source .NET RQL library for RedDot CMS / OpenText WSM Management Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Pages
IBrowse.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 using erminas.SmartAPI.CMS.Project.Folder;
19 
20 namespace erminas.SmartAPI.CMS.Project.ContentClasses.Elements
21 {
22  public enum Direction
23  {
24  Forward = 0,
25  Back = 1
26  }
27 
28  public enum Appearance
29  {
30  StandardField = 0,
31  Image = 1
32  }
33 
34  public interface IBrowse : IContentClassElement
35  {
36  BrowseAlignment Align { get; set; }
37  string AltText { get; set; }
38  Appearance Appearance { get; set; }
39  string Border { get; set; }
40  string DefaultValue { get; set; }
41  string DescriptionInCurrentDisplayLanguage { get; set; }
42  Direction Direction { get; set; }
43  IFolder Folder { get; set; }
44  string HSpace { get; set; }
45  string Height { get; set; }
46  bool IsAltPreassignedAutomatically { get; set; }
47  bool IsLanguageIndependent { get; set; }
48  bool IsOnlyPathAndFilenameInserted { get; set; }
49  bool IsSyntaxConformingToXHtml { get; set; }
50  ILanguageDependentValue<IFile> SampleImage { get; }
51  ILanguageDependentValue<IFile> SrcFile { get; }
52  string Supplement { get; set; }
53  string Usemap { get; set; }
54  string VSpace { get; set; }
55  string Width { get; set; }
56  }
57 
58  internal class Browse : ContentClassElement, IBrowse
59  {
60  internal Browse(IContentClass contentClass, XmlElement xmlElement) : base(contentClass, xmlElement)
61  {
62  }
63 
64  [RedDot("eltalign", ConverterType = typeof (StringEnumConverter<BrowseAlignment>))]
65  public BrowseAlignment Align
66  {
67  get { return GetAttributeValue<BrowseAlignment>(); }
68  set { SetAttributeValue(value); }
69  }
70 
71  [RedDot("eltalt")]
72  public string AltText
73  {
74  get { return GetAttributeValue<string>(); }
75  set { SetAttributeValue(value); }
76  }
77 
78  [RedDot("eltnextpagetype", ConverterType = typeof (EnumConverter<Appearance>))]
79  public Appearance Appearance
80  {
81  get { return GetAttributeValue<Appearance>(); }
82  set { SetAttributeValue(value); }
83  }
84 
85  [RedDot("eltborder")]
86  public string Border
87  {
88  get { return GetAttributeValue<string>(); }
89  set { SetAttributeValue(value); }
90  }
91 
92  public override ContentClassCategory Category
93  {
94  get { return ContentClassCategory.Structural; }
95  }
96 
97  [RedDot("eltdefaultvalue")]
98  public string DefaultValue
99  {
100  get { return GetAttributeValue<string>(); }
101  set { SetAttributeValue(value); }
102  }
103 
104  [RedDot("eltrddescription")]
105  public string DescriptionInCurrentDisplayLanguage
106  {
107  get { return GetAttributeValue<string>(); }
108  set { SetAttributeValue(value); }
109  }
110 
111  [RedDot("eltdirection", ConverterType = typeof (EnumConverter<Direction>))]
112  public Direction Direction
113  {
114  get { return GetAttributeValue<Direction>(); }
115  set { SetAttributeValue(value); }
116  }
117 
118  [RedDot("eltfolderguid", ConverterType = typeof (FolderConverter))]
119  public IFolder Folder
120  {
121  get { return GetAttributeValue<IFolder>(); }
122  set { SetAttributeValue(value); }
123  }
124 
125  [RedDot("elthspace")]
126  public string HSpace
127  {
128  get { return GetAttributeValue<string>(); }
129  set { SetAttributeValue(value); }
130  }
131 
132  [RedDot("eltheight")]
133  public string Height
134  {
135  get { return GetAttributeValue<string>(); }
136  set { SetAttributeValue(value); }
137  }
138 
139  [RedDot("eltpresetalt")]
140  public bool IsAltPreassignedAutomatically
141  {
142  get { return GetAttributeValue<bool>(); }
143  set { SetAttributeValue(value); }
144  }
145 
146  [RedDot("eltlanguageindependent")]
147  public bool IsLanguageIndependent
148  {
149  get { return GetAttributeValue<bool>(); }
150  set { SetAttributeValue(value); }
151  }
152 
153  [RedDot("eltonlyhrefvalue")]
154  public bool IsOnlyPathAndFilenameInserted
155  {
156  get { return GetAttributeValue<bool>(); }
157  set { SetAttributeValue(value); }
158  }
159 
160  [RedDot("eltxhtmlcompliant")]
161  public bool IsSyntaxConformingToXHtml
162  {
163  get { return GetAttributeValue<bool>(); }
164  set { SetAttributeValue(value); }
165  }
166 
167  [RedDot("__examplefile", ConverterType = typeof (ExampleFileConverter), DependsOn = "eltfolderguid")]
168  public ILanguageDependentValue<IFile> SampleImage
169  {
170  get { return GetAttributeValue<ILanguageDependentValue<IFile>>(); }
171  }
172 
173  [RedDot("__srcfile", ConverterType = typeof (SrcFileConverter))]
174  public ILanguageDependentValue<IFile> SrcFile
175  {
176  get { return GetAttributeValue<ILanguageDependentValue<IFile>>(); }
177  }
178 
179  [RedDot("eltsupplement")]
180  public string Supplement
181  {
182  get { return GetAttributeValue<string>(); }
183  set { SetAttributeValue(value); }
184  }
185 
186  [RedDot("eltusermap")]
187  public string Usemap
188  {
189  get { return GetAttributeValue<string>(); }
190  set { SetAttributeValue(value); }
191  }
192 
193  [RedDot("eltvspace")]
194  public string VSpace
195  {
196  get { return GetAttributeValue<string>(); }
197  set { SetAttributeValue(value); }
198  }
199 
200  [RedDot("eltwidth")]
201  public string Width
202  {
203  get { return GetAttributeValue<string>(); }
204  set { SetAttributeValue(value); }
205  }
206  }
207 }