Interface IPageStore
Defines a set of methods for loading and storing PageData objects.
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 7.19.2Syntax
public interface IPageStoreMethods
Copy(PageReference, PageReference, Boolean, Boolean)
Copy a page to another container.
Declaration
PageReference Copy(PageReference pageLink, PageReference destinationLink, bool publishOnDestination, bool allowThreading)Parameters
| Type | Name | Description | 
|---|---|---|
| PageReference | pageLink | The link to the page to copy. | 
| PageReference | destinationLink | The container where the page will be copied | 
| System.Boolean | publishOnDestination | If the new pages should be published on the destination | 
| System.Boolean | allowThreading | Run the local copy process on a separate thread (don't work for remote sites). | 
Returns
| Type | Description | 
|---|---|
| PageReference | 
Remarks
Note, when a page is copied successfully the CreatedPage event is fired, since a page is created in the copy process. But in contrast to the Save method, that also fires the CreatedPage method and always passes an initialized PageData object in the PageEventArgs object to the event handler, the Copy method does not. Instead it only passes a pagereference to the copied page and it is up to the handler to load the page data. The reason for this behavior in the Copy method is performance.
Exceptions
| Type | Condition | 
|---|---|
| AccessDeniedException | Thrown when user doesnt have enough access right to perform this action | 
CreateLanguageBranch(PageReference, ILanguageSelector)
Create a page language in database.
Declaration
PageData CreateLanguageBranch(PageReference pageLink, ILanguageSelector selector)Parameters
| Type | Name | Description | 
|---|---|---|
| PageReference | pageLink | The link to the page to create a language branch for. | 
| ILanguageSelector | selector | The language to create. | 
Returns
| Type | Description | 
|---|---|
| PageData | A PageData object with the newly created page data. | 
Exceptions
| Type | Condition | 
|---|---|
| AccessDeniedException | Thrown when user does not have enough access right to perform this action | 
Delete(PageReference, Boolean)
Delete a page from database
Declaration
void Delete(PageReference pageLink, bool forceDelete)Parameters
| Type | Name | Description | 
|---|---|---|
| PageReference | pageLink | The link to the page which will be deleted | 
| System.Boolean | forceDelete | Delete page even if being linked by other pages | 
Exceptions
| Type | Condition | 
|---|---|
| AccessDeniedException | Thrown when user doesnt have enough access right to perform this action | 
DeleteChildren(PageReference, Boolean)
Delete children of a page from database.
Declaration
void DeleteChildren(PageReference pageLink, bool forceDelete)Parameters
| Type | Name | Description | 
|---|---|---|
| PageReference | pageLink | The children of this page will be deleted. | 
| System.Boolean | forceDelete | Delete page even if referenced by other pages. | 
Exceptions
| Type | Condition | 
|---|---|
| AccessDeniedException | Thrown when user does not have enough access right to perform this action | 
DeleteLanguageBranch(PageReference, String)
Delete a page language from database
Declaration
void DeleteLanguageBranch(PageReference pageLink, string languageBranch)Parameters
| Type | Name | Description | 
|---|---|---|
| PageReference | pageLink | The link to the page which will be deleted | 
| System.String | languageBranch | The language branch to delete | 
Remarks
You cannot delete the master language branch
Exceptions
| Type | Condition | 
|---|---|
| AccessDeniedException | Thrown when user doesnt have enough access right to perform this action | 
DeleteVersion(PageReference)
Delete a single version of a page
Declaration
void DeleteVersion(PageReference pageLink)Parameters
| Type | Name | Description | 
|---|---|---|
| PageReference | pageLink | Link to the page and version which will be deleted | 
Remarks
The published version of page cannot be deleted
Exceptions
| Type | Condition | 
|---|---|
| AccessDeniedException | Thrown when user does not have enough access right to perform this action | 
FindPagesWithCriteria(PageReference, PropertyCriteriaCollection, String, ILanguageSelector)
Search for pages that fulfil specific criteria
Declaration
PageDataCollection FindPagesWithCriteria(PageReference pageLink, PropertyCriteriaCollection criterias, string languageBranch, ILanguageSelector selector)Parameters
| Type | Name | Description | 
|---|---|---|
| PageReference | pageLink | The root page for which the search will be performed | 
| PropertyCriteriaCollection | criterias | The criterias for pages | 
| System.String | languageBranch | Only search for pages on specific language branch | 
| ILanguageSelector | selector | A language selector used to determine the language of pages to return | 
Returns
| Type | Description | 
|---|---|
| PageDataCollection | A collection of pages that fulfil the criteras, will be empty if no match is found. | 
GetChildren(PageReference, ILanguageSelector, Int32, Int32)
Retrieve page listing.
Declaration
PageDataCollection GetChildren(PageReference pageLink, ILanguageSelector selector, int startIndex, int maxRows)Parameters
| Type | Name | Description | 
|---|---|---|
| PageReference | pageLink | List children of this page | 
| ILanguageSelector | selector | Select language for page | 
| System.Int32 | startIndex | |
| System.Int32 | maxRows | 
Returns
| Type | Description | 
|---|---|
| PageDataCollection | The pages that match the listing criteria | 
Exceptions
| Type | Condition | 
|---|---|
| AccessDeniedException | Thrown when user does not have enough access right to perform this action | 
GetDefaultPageData(PageReference, Int32, ILanguageSelector)
Get a PageData object with default values and specify required access level manually.
Declaration
PageData GetDefaultPageData(PageReference parentPageLink, int pageTypeID, ILanguageSelector selector)Parameters
| Type | Name | Description | 
|---|---|---|
| PageReference | parentPageLink | The parent page of the "virtual" new page. | 
| System.Int32 | pageTypeID | The page type of the new page. | 
| ILanguageSelector | selector | The language to which page should be created | 
Returns
| Type | Description | 
|---|---|
| PageData | A PageData object that contains the default values for a new page of the indicated type that is about to be created under parentPageLink. | 
Exceptions
| Type | Condition | 
|---|---|
| AccessDeniedException | Thrown when user does not have enough access right to perform this action. | 
GetLanguageBranches(PageReference)
Get all language branches for a page from database.
Declaration
PageDataCollection GetLanguageBranches(PageReference pageLink)Parameters
| Type | Name | Description | 
|---|---|---|
| PageReference | pageLink | The page to read. | 
Returns
| Type | Description | 
|---|---|
| PageDataCollection | A collection of pages that contains the found language branches. | 
GetPage(PageReference, ILanguageSelector)
Read a single page.
Declaration
PageData GetPage(PageReference pageLink, ILanguageSelector selector)Parameters
| Type | Name | Description | 
|---|---|---|
| PageReference | pageLink | The page to read. | 
| ILanguageSelector | selector | The language to select | 
Returns
| Type | Description | 
|---|---|
| PageData | A PageData object with the page data. | 
Exceptions
| Type | Condition | 
|---|---|
| AccessDeniedException | Thrown when user does not have enough access right to perform this action | 
ListDelayedPublish()
Lists all pages that are set to delayed publish.
Declaration
PageDataCollection ListDelayedPublish()Returns
| Type | Description | 
|---|---|
| PageDataCollection | 
ListPublishedVersions(PageReference)
Lists the published versions
Declaration
PageVersionCollection ListPublishedVersions(PageReference pageLink)Parameters
| Type | Name | Description | 
|---|---|---|
| PageReference | pageLink | The page link. | 
Returns
| Type | Description | 
|---|---|
| PageVersionCollection | All published versions for the page | 
ListVersions(PageReference)
Lists all versions
Declaration
PageVersionCollection ListVersions(PageReference pageLink)Parameters
| Type | Name | Description | 
|---|---|---|
| PageReference | pageLink | The page link. | 
Returns
| Type | Description | 
|---|---|
| PageVersionCollection | 
ListVersions(PageReference, String)
Lists all versions for a page for a specific language
Declaration
PageVersionCollection ListVersions(PageReference pageLink, string languageBranch)Parameters
| Type | Name | Description | 
|---|---|---|
| PageReference | pageLink | The page link. | 
| System.String | languageBranch | The language branch. | 
Returns
| Type | Description | 
|---|---|
| PageVersionCollection | All matching versions | 
LoadPublishedVersion(PageReference)
Loads the published version (if the it is a MasterLanguageBranch).
Declaration
PageVersion LoadPublishedVersion(PageReference pageLink)Parameters
| Type | Name | Description | 
|---|---|---|
| PageReference | pageLink | The page link. | 
Returns
| Type | Description | 
|---|---|
| PageVersion | 
LoadPublishedVersion(PageReference, String)
Loads the published version a page with specific language Branch
Declaration
PageVersion LoadPublishedVersion(PageReference pageLink, string languageBranch)Parameters
| Type | Name | Description | 
|---|---|---|
| PageReference | pageLink | The page link. | 
| System.String | languageBranch | The language branch. | 
Returns
| Type | Description | 
|---|---|
| PageVersion | 
LoadVersion(PageReference)
Loads the version.
Declaration
PageVersion LoadVersion(PageReference pageLink)Parameters
| Type | Name | Description | 
|---|---|---|
| PageReference | pageLink | The page link. | 
Returns
| Type | Description | 
|---|---|
| PageVersion | 
Move(PageReference, PageReference)
Move a page to another container
Declaration
void Move(PageReference pageLink, PageReference destinationLink)Parameters
| Type | Name | Description | 
|---|---|---|
| PageReference | pageLink | The link to the page to move | 
| PageReference | destinationLink | The container to which the page will be moved | 
Exceptions
| Type | Condition | 
|---|---|
| AccessDeniedException | Thrown when user does not have enough access right to perform this action. | 
MoveToWastebasket(PageReference)
Move a page to the Wastebasket
Declaration
void MoveToWastebasket(PageReference pageLink)Parameters
| Type | Name | Description | 
|---|---|---|
| PageReference | pageLink | The link to the page to move | 
Remarks
Moves a page from its current location into the Recycle Bin. This is the same as doing:
Move(pageLink, EPiServer.Global.EPConfig.Wastebasket, AccessLevel.Delete, AccessLevel.NoAccess);Note: You need Delete access to the page that is being moved.
Exceptions
| Type | Condition | 
|---|---|
| AccessDeniedException | Thrown when user does not have enough access right to perform this action. | 
Save(PageData, SaveAction)
Save page to database and specify required access level manually.
Declaration
PageReference Save(PageData page, SaveAction action)Parameters
| Type | Name | Description | 
|---|---|---|
| PageData | page | A initalized PageData object containing data to be saved | 
| SaveAction | action | Action that will be performed | 
Returns
| Type | Description | 
|---|---|
| PageReference | 
Remarks
If PageLink is empty a new page will be created
Exceptions
| Type | Condition | 
|---|---|
| AccessDeniedException | Thrown when user doesnt have enough access right to perform this action | 
