Class PageVersionDataSource
Provides PageVersion data to DataBoundControl implementations.
Inheritance
Implements
Inherited Members
Namespace: EPiServer.Web.WebControls
Assembly: EPiServer.dll
Version: 8.11.0Syntax
public class PageVersionDataSource : GenericDataSource<PageVersion, PageVersionCollection, PageReference>, IDataSourceMethods
Remarks
This class does not use the GenericDataSource base class since it lacks a public default ctor.
Constructors
PageVersionDataSource()
Declaration
public PageVersionDataSource()
Properties
ContentVersionService
Declaration
public Injected<IContentVersionRepository> ContentVersionService { get; set; }
Property Value
Type | Description |
---|---|
Injected<IContentVersionRepository> |
LanguageBranch
Gets or sets a language branch to view and edit versions for
Declaration
public string LanguageBranch { get; set; }
Property Value
Type | Description |
---|---|
System.String |
PageLink
Gets or sets a references to the page to view and edit versions for
Declaration
public PageReference PageLink { get; set; }
Property Value
Type | Description |
---|---|
PageReference |
Methods
CreateItem(List<PageVersion>)
Creation of PageVersion is not supported.
Declaration
protected override PageVersion CreateItem(List<PageVersion> items)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<PageVersion> | items | the list of current instances in the given scope. |
Returns
Type | Description |
---|---|
PageVersion |
Overrides
Remarks
Since PageVersionDataSource not support creation of items it will alwys throw System.NotSupportedException
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Is always thrown |
DeleteItem(PageVersion)
Deletes a specific PageVersion
Declaration
protected override void DeleteItem(PageVersion item)
Parameters
Type | Name | Description |
---|---|---|
PageVersion | item | The item to delete. |
Overrides
ListItems()
Lists all page versions for specified PageLink. If LanguageBranch is given only version for that language is listed otherwise all versions for all languages are listed.
Declaration
protected override List<PageVersion> ListItems()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<PageVersion> | a list of instances. |
Overrides
LoadItem(PageReference)
Loads a specific page version.
Declaration
protected override PageVersion LoadItem(PageReference key)
Parameters
Type | Name | Description |
---|---|---|
PageReference | key | The key of the instance to load. |
Returns
Type | Description |
---|---|
PageVersion | A object instance. |
Overrides
SaveItem(PageVersion)
Updates of PageVersion is not supported through PageVersionDataSource.
Declaration
protected override void SaveItem(PageVersion item)
Parameters
Type | Name | Description |
---|---|---|
PageVersion | item | The item to persist. |
Overrides
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Is always thrown |