Class PageTransfer
The PageTransfer class is the class to transform and transfer pages both in the local site and to create export packages, and restore pages from the export package.
Inheritance
Inherited Members
Namespace: EPiServer.Core.Transfer
Assembly: EPiServer.dll
Version: 8.11.0Syntax
[Obsolete("Use instead ContentTransfer")]
public class PageTransfer : IPageTransfer, IRawPageTransfer
Constructors
PageTransfer(IPageTransferContext)
Initializes a new instance of the PageTransfer class based on a transfer context.
Declaration
public PageTransfer(IPageTransferContext context)
Parameters
Type | Name | Description |
---|---|---|
IPageTransferContext | context | The transfer context. |
PageTransfer(IPageTransferContext, IContentRepository, IContentTypeRepository, IContentDataFactory<PageData>, IPageDataBuilder, ILanguageBranchRepository, IContentProviderManager, IPageQuickSearch, IPropertyDefinitionTypeRepository, ContentFactory)
Initializes a new instance of the PageTransfer class based on a transfer context.
Declaration
public PageTransfer(IPageTransferContext context, IContentRepository contentRepository, IContentTypeRepository contentTypeRepository, IContentDataFactory<PageData> pageDataFactory, IPageDataBuilder pageDataBuilder, ILanguageBranchRepository languageBranchRepository, IContentProviderManager pageProviderManager, IPageQuickSearch pageQuickSearcher, IPropertyDefinitionTypeRepository propertyDefinitionTypeRepository, ContentFactory contentFactory)
Parameters
Type | Name | Description |
---|---|---|
IPageTransferContext | context | The transfer context. |
IContentRepository | contentRepository | The page repository. |
IContentTypeRepository | contentTypeRepository | The content type repository. |
IContentDataFactory<PageData> | pageDataFactory | The page data factory. |
IPageDataBuilder | pageDataBuilder | The page data builder. |
ILanguageBranchRepository | languageBranchRepository | The language branch repository. |
IContentProviderManager | pageProviderManager | The page enterprise service. |
IPageQuickSearch | pageQuickSearcher | The page quick searcher. |
IPropertyDefinitionTypeRepository | propertyDefinitionTypeRepository | The property definition type repository. |
ContentFactory | contentFactory | The content factory. |
Fields
FactoryKey
A key for the class factory for the copy functionality.
Declaration
public const string FactoryKey = "DecoratedClassFactory:EPiServer.Core.Transfer.Copy"
Field Value
Type | Description |
---|---|
System.String |
PrototypeName
A temporary name for pages created at import before an actual name is specified.
Declaration
public const string PrototypeName = "Placeholder for page of type : "
Field Value
Type | Description |
---|---|
System.String |
Properties
HasMoreData
Gets a value indicating whether this page transfer has more data to offer.
Declaration
public bool HasMoreData { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ImportedBlockTypes
Gets or sets the imported block types.
Declaration
public IEnumerable<BlockType> ImportedBlockTypes { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<BlockType> | The imported block types. |
TransferContext
Gets the transfer context.
Declaration
public IPageTransferContext TransferContext { get; }
Property Value
Type | Description |
---|---|
IPageTransferContext | The transfer context. |
TransferHandlerContext
Gets the transfer handler context.
Declaration
public ITransferHandlerContext TransferHandlerContext { get; }
Property Value
Type | Description |
---|---|
ITransferHandlerContext | The transfer handler context. |
Methods
Export(PageData, AccessLevel)
Transfer the specified page to an exportable format.
Declaration
public ITransferPageData Export(PageData page, AccessLevel requiredSourceAccess)
Parameters
Type | Name | Description |
---|---|---|
PageData | page | The page to be transfered. |
AccessLevel | requiredSourceAccess | The required source access. |
Returns
Type | Description |
---|---|
ITransferPageData | A ITransferPageData to represent a page to be tranfered. |
Export(RawContentInfo, AccessLevel)
Transfer the specified page to an exportable format.
Declaration
public ITransferPageData Export(RawContentInfo rawPage, AccessLevel requiredSourceAccess)
Parameters
Type | Name | Description |
---|---|---|
RawContentInfo | rawPage | The raw page. |
AccessLevel | requiredSourceAccess | The required source access. |
Returns
Type | Description |
---|---|
ITransferPageData | A ITransferPageData to represent a page to be tranfered. |
Export(RawPageInfo, AccessLevel)
Declaration
[Obsolete("Use method that takes RawContentInfo instead")]
public ITransferPageData Export(RawPageInfo rawPage, AccessLevel requiredSourceAccess)
Parameters
Type | Name | Description |
---|---|---|
RawPageInfo | rawPage | |
AccessLevel | requiredSourceAccess |
Returns
Type | Description |
---|---|
ITransferPageData |
GetPageIdentifier(Dictionary<String, String>)
Gets the page identifier as a string from the name - value property map.
Declaration
protected virtual string GetPageIdentifier(Dictionary<string, string> propertyStringLookup)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.String, System.String> | propertyStringLookup | The property string lookup. |
Returns
Type | Description |
---|---|
System.String |
GetRawPageInfo(ContentReference, String)
Gets the RawPageInfo corresponding to the referenced page and language branch
Declaration
protected virtual RawContentInfo GetRawPageInfo(ContentReference pageLink, string languageBranch)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | pageLink | The page link. |
System.String | languageBranch | The language branch. |
Returns
Type | Description |
---|---|
RawContentInfo | A RawPageInfo instance |
Import(ITransferPageData, AccessLevel)
Create a page based on the exported page.
Declaration
public virtual PageReference Import(ITransferPageData page, AccessLevel requiredDestinationAccess)
Parameters
Type | Name | Description |
---|---|---|
ITransferPageData | page | The exported page. |
AccessLevel | requiredDestinationAccess | The required destination access. |
Returns
Type | Description |
---|---|
PageReference | A page referense for the copied page. |
ImportPageLanguage(PageReference, RawPage, AccessLevel)
Imports the page languages.
Declaration
protected virtual void ImportPageLanguage(PageReference destinationLink, RawPage page, AccessLevel requiredDestinationAccess)
Parameters
Type | Name | Description |
---|---|---|
PageReference | destinationLink | The destination link. |
RawPage | page | The master language page. |
AccessLevel | requiredDestinationAccess | The required destination access. |
ImportPageObjectReferences(PageData, RawPage)
Imports the page object references.
Declaration
protected virtual void ImportPageObjectReferences(PageData page, RawPage rawPage)
Parameters
Type | Name | Description |
---|---|---|
PageData | page | The page. |
RawPage | rawPage | The raw page. |
ImportProperties(PageData, RawPage)
Imports the properties.
Declaration
public virtual void ImportProperties(PageData newPage, RawPage importedPage)
Parameters
Type | Name | Description |
---|---|---|
PageData | newPage | The page to import properties from. |
RawPage | importedPage | The imported page. |
ImportProperty(RawPage, RawProperty, PropertyData)
Imports a specific raw property.
Declaration
public virtual void ImportProperty(RawPage contextPage, RawProperty importedProp, PropertyData propDestination)
Parameters
Type | Name | Description |
---|---|---|
RawPage | contextPage | The context page. |
RawProperty | importedProp | The property to import. |
PropertyData | propDestination | The created property. |
Remarks
The page might not exist.
ImportProperty(RawProperty, PropertyData)
Imports a specific raw property.
Declaration
public virtual void ImportProperty(RawProperty importedProp, PropertyData propDestination)
Parameters
Type | Name | Description |
---|---|---|
RawProperty | importedProp | The property to import. |
PropertyData | propDestination | The created property. |
ResolveParentLink(Dictionary<String, String>)
Resolves the parent link of the page. If no parent has been imported or the flag IgnorePageHierarchy is set return the destination page.
Declaration
protected virtual ContentReference ResolveParentLink(Dictionary<string, string> propertyLookup)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.String, System.String> | propertyLookup | The string map of all property name - value pair. |
Returns
Type | Description |
---|---|
ContentReference |