SmartAPI
Open Source .NET RQL library for RedDot CMS / OpenText WSM Management Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Pages
IAnchor.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 {
22  {
23  string DescriptionInCurrentDisplayLanguage { get; set; }
24 
25  ILanguageDependentValue<string> ExampleText { get; }
26 
27  HtmlTarget HtmlTarget { get; set; }
28 
29  bool IsCrlfConvertedToBr { get; set; }
30 
31  bool IsDisplayingConnectedPagesInTargetContainerOfMainLinkIfAvailable { get; set; }
32 
33  bool IsDynamic { get; set; }
34 
35  bool IsLanguageIndependent { get; set; }
36 
37  bool IsLinkNotAutomaticallyRemoved { get; set; }
38 
39  bool IsNotConvertingCharactersToHtml { get; set; }
40 
41  bool IsNotRelevantForWorklow { get; set; }
42 
43  bool IsOnlyPathAndFilenameInserted { get; set; }
44 
45  bool IsSyntaxConformingToXHtml { get; set; }
46 
47  bool IsTransferingContentOfFollowingPages { get; set; }
48 
49  ILanguageVariant LanguageVariantToSwitchTo { get; set; }
50 
51  Pages.Elements.IContainer PreassignedTargetContainer { get; set; }
52 
53  IProjectVariant ProjectVariantToSwitchTo { get; set; }
54 
55  string Supplement { get; set; }
56 
57  string Value { get; set; }
58 
59  new void CommitInCurrentLanguage();
60 
61  new void CommitInLanguage(string languageAbbreviation);
62  }
63 
64  internal class Anchor : AbstractWorkflowAssignments, IAnchor
65  {
66  private readonly ReferencePreassignment _referencePreassignment;
67  private readonly TargetContainerPreassignment _targetContainerPreassignment;
68 
69  protected Anchor(IContentClass contentClass, XmlElement xmlElement) : base(contentClass, xmlElement)
70  {
71  PreassignedContentClasses = new PreassignedContentClassesAndPageDefinitions(this);
72  _targetContainerPreassignment = new TargetContainerPreassignment(this);
73  _referencePreassignment = new ReferencePreassignment(this);
74  }
75 
76  public override void Refresh()
77  {
78  _referencePreassignment.InvalidateCache();
79  base.Refresh();
80  }
81 
82  public override ContentClassCategory Category
83  {
84  get { return ContentClassCategory.Structural; }
85  }
86 
87  [RedDot("eltrddescription")]
88  public string DescriptionInCurrentDisplayLanguage
89  {
90  get { return GetAttributeValue<string>(); }
91  set { SetAttributeValue(value); }
92  }
93 
94  [RedDot("eltrdexample")]
95  public ILanguageDependentValue<string> ExampleText
96  {
97  get { return GetAttributeValue<ILanguageDependentValue<string>>(); }
98  }
99 
100  [RedDot("elttarget", ConverterType = typeof (StringEnumConverter<HtmlTarget>))]
101  public HtmlTarget HtmlTarget
102  {
103  get { return GetAttributeValue<HtmlTarget>(); }
104  set { SetAttributeValue(value); }
105  }
106 
107  [RedDot("eltcrlftobr")]
108  public bool IsCrlfConvertedToBr
109  {
110  get { return GetAttributeValue<bool>(); }
111  set { SetAttributeValue(value); }
112  }
113 
114  public bool IsDisplayingConnectedPagesInTargetContainerOfMainLinkIfAvailable
115  {
116  get { return _targetContainerPreassignment.IsDisplayingConnectedPagesInTargetContainerOfMainLinkIfAvailable; }
117  set { _targetContainerPreassignment.IsDisplayingConnectedPagesInTargetContainerOfMainLinkIfAvailable = value; }
118  }
119 
120  [RedDot("eltisdynamic")]
121  public bool IsDynamic
122  {
123  get { return GetAttributeValue<bool>(); }
124  set { SetAttributeValue(value); }
125  }
126 
127  [RedDot("eltrequired")]
128  public bool IsEditingMandatory
129  {
130  get { return GetAttributeValue<bool>(); }
131  set { SetAttributeValue(value); }
132  }
133 
134  [RedDot("eltlanguageindependent")]
135  public bool IsLanguageIndependent
136  {
137  get { return GetAttributeValue<bool>(); }
138  set { SetAttributeValue(value); }
139  }
140 
141  [RedDot("eltdonotremove")]
142  public bool IsLinkNotAutomaticallyRemoved
143  {
144  get { return GetAttributeValue<bool>(); }
145  set { SetAttributeValue(value); }
146  }
147 
148  [RedDot("eltdonothtmlencode")]
149  public bool IsNotConvertingCharactersToHtml
150  {
151  get { return GetAttributeValue<bool>(); }
152  set { SetAttributeValue(value); }
153  }
154 
155  [RedDot("eltignoreworkflow")]
156  public bool IsNotRelevantForWorklow
157  {
158  get { return GetAttributeValue<bool>(); }
159  set { SetAttributeValue(value); }
160  }
161 
162  [RedDot("eltonlyhrefvalue")]
163  public bool IsOnlyPathAndFilenameInserted
164  {
165  get { return GetAttributeValue<bool>(); }
166  set { SetAttributeValue(value); }
167  }
168 
169  [RedDot("eltxhtmlcompliant")]
170  public bool IsSyntaxConformingToXHtml
171  {
172  get { return GetAttributeValue<bool>(); }
173  set { SetAttributeValue(value); }
174  }
175 
176  [RedDot("eltextendedlist")]
177  public bool IsTransferingContentOfFollowingPages
178  {
179  get { return GetAttributeValue<bool>(); }
180  set { SetAttributeValue(value); }
181  }
182 
183  [RedDot("eltlanguagevariantguid", ConverterType = typeof (LanguageVariantConverter))]
184  public ILanguageVariant LanguageVariantToSwitchTo
185  {
186  get { return GetAttributeValue<ILanguageVariant>(); }
187  set { SetAttributeValue(value); }
188  }
189 
190  public PreassignedContentClassesAndPageDefinitions PreassignedContentClasses { get; private set; }
191 
192  public Pages.Elements.IContainer PreassignedTargetContainer
193  {
194  get { return _targetContainerPreassignment.TargetContainer; }
195  set { _targetContainerPreassignment.TargetContainer = value; }
196  }
197 
198  [RedDot("eltprojectvariantguid", ConverterType = typeof (ProjectVariantConverter))]
199  public IProjectVariant ProjectVariantToSwitchTo
200  {
201  get { return GetAttributeValue<IProjectVariant>(); }
202  set { SetAttributeValue(value); }
203  }
204 
205  [RedDot("eltsupplement")]
206  public string Supplement
207  {
208  get { return GetAttributeValue<string>(); }
209  set { SetAttributeValue(value); }
210  }
211 
212  [RedDot("eltvalue")]
213  public string Value
214  {
215  get { return GetAttributeValue<string>(); }
216  set { SetAttributeValue(value); }
217  }
218 
219  public IReferencePreassignTarget PreassignedReference
220  {
221  get { return _referencePreassignment.Target; }
222  set { _referencePreassignment.Target = value; }
223  }
224  }
225 }