SmartAPI
Open Source .NET RQL library for RedDot CMS / OpenText WSM Management Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Pages
IPage.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;
17 using System.Collections.Generic;
18 using erminas.SmartAPI.CMS.Project.ContentClasses;
19 using erminas.SmartAPI.CMS.Project.Pages.Elements;
20 using erminas.SmartAPI.CMS.Project.Workflows;
21 using erminas.SmartAPI.CMS.ServerManagement;
22 using erminas.SmartAPI.Exceptions;
23 using erminas.SmartAPI.Utils.CachedCollections;
24 
25 namespace erminas.SmartAPI.CMS.Project.Pages
26 {
27  public enum PageType
28  {
29  All = 0,
30  Released = 1,
31  Unlinked = 8192,
32  Draft = 262144
33  };
34 
35  public enum Replace
36  {
37  OnlyForThisPage,
38  ForAllPagesOfContentClass
39  }
40 
41  public enum PageState
42  {
43  NotSet = 0,
44  IsReleased = 1,
45  WaitsForRelease = 2,
46  WaitsForCorrection = 3,
47  SavedAsDraft = 4,
48  NotAvailableInLanguage = 5,
49 
53  NeverHasBeenReleasedInOriginalLanguage = 6,
54  IsInRecycleBin = 10,
55  WillBeArchived = 50,
56  WillBeRemovedCompletely = 99
57  }
58 
59  [Flags]
60  public enum PageReleaseStatus
61  {
62  Draft = 65536,
63  WorkFlow = 32768,
64  Released = 4096,
65  NotSet = 0,
66  Rejected = 16384
67  };
68 
69  [Flags]
70  public enum PageFlags
71  {
72  NotSet = 0,
73  NotForBreadcrumb = 4,
74  Workflow = 64,
75  WaitingForTranslation = 1024,
76  Unlinked = 8192,
77  WaitingForCorrection = 131072,
78  Draft = 262144,
79  Released = 524288,
80  BreadCrumbStaringPoint = 2097152,
81  ContainsExternalReference = 8388608,
82  OwnPageWaitingForRelease = 134217728,
83  Locked = 268435456,
84  Null = -1
85  }
86 
87  public enum PreviewHtmlType
88  {
89  Raw = 0,
90  AddCmsBaseUrlToHeadSection
91  }
92 
100  {
101  DateTime CreateDate { get; }
102 
103  DateTime CheckinDate { get; }
104 
105  DateTime LastChangeDate { get; }
106 
107  IUser LastChangeUser { get; }
108 
112  void Commit();
113 
117  IContentClass ContentClass { get; }
118 
122  IIndexedRDList<string, IPageElement> ContentElements { get; }
123 
127  [Obsolete("This method is experimental and probably will change in a future version")]
128  IPageCopyAndConnectJob CreateCopyAndConnectJob(ILinkElement connectionTarget,
130 
140  [Obsolete("This method is experimental and probably will change in a future version")]
141  void CopyAndConnectAsync(ILinkElement connectionTarget,
143 
147  new void Delete();
148 
152  void DeleteFromRecycleBin();
153 
161  void DeleteIfNotReferenced();
162 
174  void DeleteIrrevocably(int maxWaitForDeletionInMs = 1250);
175 
179  void DisconnectFromParent();
180 
181  bool Exists { get; }
182 
186  string Filename { get; set; }
187 
191  string Headline { get; set; }
192 
196  int Id { get; }
197 
202  IPageElement this[string elementName] { get; }
203 
204  ILanguageVariant LanguageVariant { get; }
205 
209  IRDList<ILinkElement> LinkElements { get; }
210 
211  IRDList<ILinkingAndAppearance> LinkedFrom { get; }
212 
213  ILinkElement MainParentLinkElement { get; set; }
214 
219  [Obsolete("This is the PARENT link of the page, in a future version this will change to the main navigation link element of this page.")]
220  ILinkElement MainLinkElement { get; set; }
221 
222  [VersionIsGreaterThanOrEqual(9, VersionName = "Version 9")]
223  ILinkElement MainLinkNavigationElement { get; set; }
224 
225  new string Name { get; set; }
226 
230  IPage Parent { get; }
231 
232  IPage Refreshed();
233 
237  void Reject();
238 
242  void Release();
243 
248  DateTime ReleaseDate { get; }
249 
253  PageReleaseStatus ReleaseStatus { get; set; }
254 
255  void ReplaceContentClass(IContentClass replacement, IDictionary<string, string> oldToNewMapping, Replace replace);
256 
260  void ResetToDraft();
261 
265  void Restore();
266 
273  void SkipWorkflow();
274 
278  PageState Status { get; set; }
279 
283  void SubmitToWorkflow();
284 
288  void Undo();
289 
293  IWorkflow Workflow { get; }
294 
295  IPagePublishJob CreatePublishJob();
296 
297  string GetPreviewHtml(PreviewHtmlType previewType);
298  }
299 }