SmartAPI
Open Source .NET RQL library for RedDot CMS / OpenText WSM Management Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Pages
erminas.SmartAPI.CMS.Project.Pages.IPages Interface Reference
+ Inheritance diagram for erminas.SmartAPI.CMS.Project.Pages.IPages:

Public Member Functions

IPage Create (IContentClass cc, string headline=null)
 Create a new page.
 
IPage CreateAndConnect (IContentClass cc, Guid linkGuid, string headline=null)
 Create a new page in the current language variant and link it.
 
IExtendedPageSearch CreateExtendedSearch ()
 Create an extended page search on this project.
 
IPageSearch CreateSearch ()
 Create a simple page search on this project.
 
IPage GetByGuid (Guid pageGuid, ILanguageVariant languageVariant)
 Get a page by its guid and its language variant. Does not load all Pages.
 
IEnumerable< IPageSearch (Action< IPageSearch > configurator=null)
 Convenience function for simple page searches. Creates a PageSearch object, configures it through the configurator parameter and returns the search result.
 
List< ResultGroupSearchExtended (Action< IExtendedPageSearch > configurator=null)
 Convenience funtion for extended page searches. Creates a new PageSearchExtended object which gets configured through the configurator parameter and returns the result of the search.
 
bool TryGetByGuid (Guid pageGuid, ILanguageVariant languageVariant, out IPage page)
 Try to get a page by its guid and its language variant.
 

Properties

IndexedRDList< int, IPageOfCurrentLanguage [get]
 All pages of the current language variant, indexed by page id. The list is cached by default.
 
IStartPagesValue StartPages [get]
 
IndexedRDList< int, IPagethis[string language] [get]
 All pages of the a specific language variant, indexed by page id. The list is cached by default.
 

Detailed Description

Definition at line 33 of file IPages.cs.

Member Function Documentation

IPage erminas.SmartAPI.CMS.Project.Pages.IPages.Create ( IContentClass  cc,
string  headline = null 
)

Create a new page.

Parameters
ccContent class of the page
headlineThe headline, or null (default) for the default headline
Returns
The newly created page
IPage erminas.SmartAPI.CMS.Project.Pages.IPages.CreateAndConnect ( IContentClass  cc,
Guid  linkGuid,
string  headline = null 
)

Create a new page in the current language variant and link it.

Parameters
ccContent class of the page
linkGuidGuid of the link the page should be linked to
headlineThe headline, or null (default) for the default headline
Returns
The newly created (and linked) page
IExtendedPageSearch erminas.SmartAPI.CMS.Project.Pages.IPages.CreateExtendedSearch ( )

Create an extended page search on this project.

Pages.CreateSearch

IPageSearch erminas.SmartAPI.CMS.Project.Pages.IPages.CreateSearch ( )

Create a simple page search on this project.

Pages.CreateExtendedSearch

IPage erminas.SmartAPI.CMS.Project.Pages.IPages.GetByGuid ( Guid  pageGuid,
ILanguageVariant  languageVariant 
)

Get a page by its guid and its language variant. Does not load all Pages.

If it does not exists, an exception gets thrown.

IEnumerable<IPage> erminas.SmartAPI.CMS.Project.Pages.IPages.Search ( Action< IPageSearch configurator = null)

Convenience function for simple page searches. Creates a PageSearch object, configures it through the configurator parameter and returns the search result.

Parameters
configuratorAction to configure the search
Returns
The search results

The following code searches for all pages with headline "test": var results = project.SearchForPages(search => search.Headline="test");

List<ResultGroup> erminas.SmartAPI.CMS.Project.Pages.IPages.SearchExtended ( Action< IExtendedPageSearch configurator = null)

Convenience funtion for extended page searches. Creates a new PageSearchExtended object which gets configured through the configurator parameter and returns the result of the search.

Parameters
configuratorAn action to configure the search
Returns
The search results

The following code searches for all pages saved as draft by the current user:

            var results = project.SearchForPagesExtended(
            search => search.AddPredicate(
            new PageStatusPredicate(PageStatusPredicate.PageStatusType.SavedAsDraft,
            PageStatusPredicate.UserType.CurrentUser)
            )
            );
        

bool erminas.SmartAPI.CMS.Project.Pages.IPages.TryGetByGuid ( Guid  pageGuid,
ILanguageVariant  languageVariant,
out IPage  page 
)

Try to get a page by its guid and its language variant.

Returns
true, if the page exists, false otherwise

Property Documentation

IndexedRDList<int, IPage> erminas.SmartAPI.CMS.Project.Pages.IPages.OfCurrentLanguage
get

All pages of the current language variant, indexed by page id. The list is cached by default.

All Pages get loaded on first access, so this may be very slow for larger projects and you might want to use GetByGuid or TryGetByGuid instead, to only load single pages.

Definition at line 48 of file IPages.cs.

IStartPagesValue erminas.SmartAPI.CMS.Project.Pages.IPages.StartPages
get

Definition at line 50 of file IPages.cs.

IndexedRDList<int, IPage> erminas.SmartAPI.CMS.Project.Pages.IPages.this[string language]
get

All pages of the a specific language variant, indexed by page id. The list is cached by default.

All Pages get loaded on first access, so this may be very slow for larger projects and you might want to use GetByGuid or TryGetByGuid instead, to only load single pages.

Definition at line 40 of file IPages.cs.


The documentation for this interface was generated from the following file: