SmartAPI
Open Source .NET RQL library for RedDot CMS / OpenText WSM Management Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Pages
ContentClasses/Elements/IMedia.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 {
23  {
24  int? AutomaticMaximumScalingHeight { get; set; }
25  int? AutomaticMaximumScalingWidth { get; set; }
26  int? ColorDepthInBit { get; set; }
27  new void CommitInCurrentLanguage();
28  new void CommitInLanguage(string languageAbbreviation);
29  MediaConversionMode ConversionModeForSelectedDocuments { get; set; }
30 
34  string EligibleSuffixes { get; set; }
35 
36  IFolder Folder { get; set; }
37 
38  bool IsConvertingOnlyNonWebCompatibleFiles { get; set; }
39  bool IsDragAndDropActivated { get; set; }
40  bool IsLanguageIndependent { get; set; }
41  bool IsLinkNotAutomaticallyRemoved { get; set; }
42  bool IsNotRelevantForWorklow { get; set; }
43  bool IsNotUsedInForm { get; set; }
44  bool IsScaledOrConverted { get; set; }
45  int? MaxFileSizeInKB { get; set; }
46  string Quality { get; set; }
47  string RequiredNamePattern { get; set; }
48  int? RequiredPictureHeight { get; set; }
49  int? RequiredPictureWidth { get; set; }
50  ILanguageDependentValue<IFile> SampleFile { get; }
51  ILanguageDependentValue<IFile> SrcFile { get; }
52  TargetFormat TargetFormat { get; set; }
53  }
54 
55  internal class Media : ContentClassElement, IMedia
56  {
57  internal Media(IContentClass contentClass, XmlElement xmlElement) : base(contentClass, xmlElement)
58  {
59  }
60 
61  [RedDot("eltmaxpicheight")]
62  public int? AutomaticMaximumScalingHeight
63  {
64  get { return GetAttributeValue<int?>(); }
65  set { SetAttributeValue(value); }
66  }
67 
68  [RedDot("eltmaxpicwidth")]
69  public int? AutomaticMaximumScalingWidth
70  {
71  get { return GetAttributeValue<int?>(); }
72  set { SetAttributeValue(value); }
73  }
74 
75  public override ContentClassCategory Category
76  {
77  get { return ContentClassCategory.Content; }
78  }
79 
80  [RedDot("eltpicdepth")]
81  public int? ColorDepthInBit
82  {
83  get { return GetAttributeValue<int?>(); }
84  set { SetAttributeValue(value); }
85  }
86 
87  [RedDot("eltconvertmode", ConverterType = typeof (StringEnumConverter<MediaConversionMode>))]
88  public MediaConversionMode ConversionModeForSelectedDocuments
89  {
90  get { return GetAttributeValue<MediaConversionMode>(); }
91  set { SetAttributeValue(value); }
92  }
93 
94  [RedDot("eltsuffixes")]
95  public string EligibleSuffixes
96  {
97  get { return GetAttributeValue<string>(); }
98  set { SetAttributeValue(value); }
99  }
100 
101  [RedDot("eltfolderguid", ConverterType = typeof (FolderConverter))]
102  public IFolder Folder
103  {
104  get { return GetAttributeValue<IFolder>(); }
105  set { SetAttributeValue(value); }
106  }
107 
108  [RedDot("eltonlynonwebsources")]
109  public bool IsConvertingOnlyNonWebCompatibleFiles
110  {
111  get { return GetAttributeValue<bool>(); }
112  set { SetAttributeValue(value); }
113  }
114 
115  [RedDot("eltdragdrop")]
116  public bool IsDragAndDropActivated
117  {
118  get { return GetAttributeValue<bool>(); }
119  set { SetAttributeValue(value); }
120  }
121 
122  [RedDot("eltlanguageindependent")]
123  public bool IsLanguageIndependent
124  {
125  get { return GetAttributeValue<bool>(); }
126  set { SetAttributeValue(value); }
127  }
128 
129  [RedDot("eltdonotremove")]
130  public bool IsLinkNotAutomaticallyRemoved
131  {
132  get { return GetAttributeValue<bool>(); }
133  set { SetAttributeValue(value); }
134  }
135 
136  [RedDot("eltignoreworkflow")]
137  public bool IsNotRelevantForWorklow
138  {
139  get { return GetAttributeValue<bool>(); }
140  set { SetAttributeValue(value); }
141  }
142 
143  [RedDot("elthideinform")]
144  public bool IsNotUsedInForm
145  {
146  get { return GetAttributeValue<bool>(); }
147  set { SetAttributeValue(value); }
148  }
149 
150  [RedDot("eltconvert")]
151  public bool IsScaledOrConverted
152  {
153  get { return GetAttributeValue<bool>(); }
154  set { SetAttributeValue(value); }
155  }
156 
157  [RedDot("eltmaxsize")]
158  public int? MaxFileSizeInKB
159  {
160  get { return GetAttributeValue<int?>(); }
161  set { SetAttributeValue(value); }
162  }
163 
164  [RedDot("eltcompression")]
165  public string Quality
166  {
167  get { return GetAttributeValue<string>(); }
168  set { SetAttributeValue(value); }
169  }
170 
171  [RedDot("eltfilename")]
172  public string RequiredNamePattern
173  {
174  get { return GetAttributeValue<string>(); }
175  set { SetAttributeValue(value); }
176  }
177 
178  [RedDot("eltpicheight")]
179  public int? RequiredPictureHeight
180  {
181  get { return GetAttributeValue<int?>(); }
182  set { SetAttributeValue(value); }
183  }
184 
185  [RedDot("eltpicwidth")]
186  public int? RequiredPictureWidth
187  {
188  get { return GetAttributeValue<int?>(); }
189  set { SetAttributeValue(value); }
190  }
191 
192  [RedDot("__examplefile", ConverterType = typeof (ExampleFileConverter), DependsOn = "eltfolderguid")]
193  public ILanguageDependentValue<IFile> SampleFile
194  {
195  get { return GetAttributeValue<ILanguageDependentValue<IFile>>(); }
196  }
197 
198  [RedDot("__srcfile", ConverterType = typeof (SrcFileConverter))]
199  public ILanguageDependentValue<IFile> SrcFile
200  {
201  get { return GetAttributeValue<ILanguageDependentValue<IFile>>(); }
202  }
203 
204  [RedDot("elttargetformat", ConverterType = typeof (StringEnumConverter<TargetFormat>))]
206  {
207  get { return GetAttributeValue<TargetFormat>(); }
208  set { SetAttributeValue(value); }
209  }
210 
211  #region ICanBeRequiredForEditing Members
212 
213  [RedDot("eltrequired")]
214  public bool IsEditingMandatory
215  {
216  get { return GetAttributeValue<bool>(); }
217  set { SetAttributeValue(value); }
218  }
219 
220  #endregion
221  }
222 }