SmartAPI
Open Source .NET RQL library for RedDot CMS / OpenText WSM Management Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Pages
IInfo.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.Utils.CachedCollections;
19 
20 namespace erminas.SmartAPI.CMS.Project.ContentClasses.Elements
21 {
22  public interface IInfo : IContentClassElement
23  {
27  IIndexedCachedList<int, IInfoAttribute> AllContentAttributes { get; }
28 
29  IInfoAttribute Content { get; set; }
30  IDateTimeFormat DateFormat { get; set; }
31  bool IsNotConvertingCharactersToHtml { get; set; }
32  bool IsUsingDataOfPageInTargetContainer { get; set; }
33  bool IsUsingMainLink { get; set; }
34  bool IsUsingRfc3066 { get; set; }
35  ILanguageVariant LanguageVariantForUrlOfPage { get; set; }
36  ISystemLocale Locale { get; set; }
37  IProjectVariant ProjectVariantForUrlOfPage { get; set; }
38  string Separator { get; set; }
39  string UserDefinedDateFormat { get; set; }
40  }
41 
42  internal class Info : ContentClassElement, IInfo
43  {
44  internal Info(IContentClass contentClass, XmlElement xmlElement) : base(contentClass, xmlElement)
45  {
46  }
47 
51  public IIndexedCachedList<int, IInfoAttribute> AllContentAttributes
52  {
53  get { return ContentClass.Project.InfoAttributes; }
54  }
55 
56  public override ContentClassCategory Category
57  {
58  get { return ContentClassCategory.Meta; }
59  }
60 
61  [RedDot("eltsubtype", ConverterType = typeof (InfoElementConverter))]
62  public IInfoAttribute Content
63  {
64  get { return GetAttributeValue<IInfoAttribute>(); }
65  set { SetAttributeValue(value); }
66  }
67 
68  [RedDot("eltformatno", ConverterType = typeof (DateTimeFormatConverter))]
69  public IDateTimeFormat DateFormat
70  {
71  get { return GetAttributeValue<IDateTimeFormat>(); }
72  set { SetAttributeValue(value); }
73  }
74 
75  [RedDot("eltdonothtmlencode")]
76  public bool IsNotConvertingCharactersToHtml
77  {
78  get { return GetAttributeValue<bool>(); }
79  set { SetAttributeValue(value); }
80  }
81 
82  [RedDot("eltevalcalledpage")]
83  public bool IsUsingDataOfPageInTargetContainer
84  {
85  get { return GetAttributeValue<bool>(); }
86  set { SetAttributeValue(value); }
87  }
88 
89  [RedDot("eltusemainlink")]
90  public bool IsUsingMainLink
91  {
92  get { return GetAttributeValue<bool>(); }
93  set { SetAttributeValue(value); }
94  }
95 
96  [RedDot("eltuserfc3066")]
97  public bool IsUsingRfc3066
98  {
99  get { return GetAttributeValue<bool>(); }
100  set { SetAttributeValue(value); }
101  }
102 
103  [RedDot("eltlanguagevariantguid")]
104  public ILanguageVariant LanguageVariantForUrlOfPage
105  {
106  get { return GetAttributeValue<ILanguageVariant>(); }
107  set { SetAttributeValue(value); }
108  }
109 
110  [RedDot("eltlcid", ConverterType = typeof (LocaleConverter))]
111  public ISystemLocale Locale
112  {
113  get { return GetAttributeValue<ISystemLocale>(); }
114  set { SetAttributeValue(value); }
115  }
116 
117  [RedDot("eltprojectvariantguid", ConverterType = typeof (ProjectVariantConverter))]
118  public IProjectVariant ProjectVariantForUrlOfPage
119  {
120  get { return GetAttributeValue<IProjectVariant>(); }
121  set { SetAttributeValue(value); }
122  }
123 
124  [RedDot("eltkeywordseparator")]
125  public string Separator
126  {
127  get { return GetAttributeValue<string>(); }
128  set { SetAttributeValue(value); }
129  }
130 
131  [RedDot("eltformatting")]
132  public string UserDefinedDateFormat
133  {
134  get { return GetAttributeValue<string>(); }
135  set { SetAttributeValue(value); }
136  }
137  }
138 }