Class ContentTransfer
The ContentTransfer class is the class to transform and transfer contents both in the local site and to create export packages, and restore contents from the export package.
Inheritance
Implements
Inherited Members
Namespace: EPiServer.Core.Transfer
Assembly: EPiServer.dll
Version: 7.19.2Syntax
public class ContentTransfer : IContentTransferConstructors
ContentTransfer(IContentRepository, IPermanentLinkMapper, IContentTypeRepository, IContentProviderManager, RawContentRetriever, IPageQuickSearch, IPropertyDefinitionTypeRepository, ContentFactory, BlobFactory, IDependentContentTransfer)
Initializes a new instance of the ContentTransfer class.
Declaration
public ContentTransfer(IContentRepository contentRepository, IPermanentLinkMapper permanentLinkMapper, IContentTypeRepository contentTypeRepository, IContentProviderManager pageProviderManager, RawContentRetriever rawContentRetriever, IPageQuickSearch pageQuickSearcher, IPropertyDefinitionTypeRepository propertyDefinitionTypeRepository, ContentFactory contentFactory, BlobFactory blobFactory, IDependentContentTransfer dependentContentTransfer)Parameters
| Type | Name | Description | 
|---|---|---|
| IContentRepository | contentRepository | The content repository. | 
| IPermanentLinkMapper | permanentLinkMapper | The permanent link mapper. | 
| IContentTypeRepository | contentTypeRepository | The content type repository. | 
| IContentProviderManager | pageProviderManager | The page provider manager. | 
| RawContentRetriever | rawContentRetriever | The raw content retriever. | 
| IPageQuickSearch | pageQuickSearcher | The page quick searcher. | 
| IPropertyDefinitionTypeRepository | propertyDefinitionTypeRepository | The property definition type repository. | 
| ContentFactory | contentFactory | The content factory. | 
| BlobFactory | blobFactory | The BLOB factory. | 
| IDependentContentTransfer | dependentContentTransfer | Handling dependent content | 
Properties
ContentTransferContext
Gets the transfer context.
Declaration
public IContentTransferContext ContentTransferContext { get; set; }Property Value
| Type | Description | 
|---|---|
| IContentTransferContext | The transfer context. | 
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. | 
InterfaceHandledTypes
Gets the interface handled types.
Declaration
protected virtual IDictionary<Type, IInterfaceHandledImport> InterfaceHandledTypes { get; }Property Value
| Type | Description | 
|---|---|
| System.Collections.Generic.IDictionary<System.Type, IInterfaceHandledImport> | The interface handled types. | 
TransferHandlerContext
Gets the transfer handler context.
Declaration
public ITransferHandlerContext TransferHandlerContext { get; }Property Value
| Type | Description | 
|---|---|
| ITransferHandlerContext | The transfer handler context. | 
Methods
Export(RawContentInfo, AccessLevel)
Transfer the specified content to an exportable format.
Declaration
public ITransferContentData Export(RawContentInfo rawContentInfo, AccessLevel requiredSourceAccess)Parameters
| Type | Name | Description | 
|---|---|---|
| RawContentInfo | rawContentInfo | The raw content. | 
| AccessLevel | requiredSourceAccess | The required source access. | 
Returns
| Type | Description | 
|---|---|
| ITransferContentData | A ITransferContentData to represent a content to be tranfered. | 
GetContentIdentifier(Dictionary<String, String>)
Gets the page identifier as a string from the name - value property map.
Declaration
protected virtual string GetContentIdentifier(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 | 
HandleDependentContent(RawContentInfo)
Declaration
protected virtual void HandleDependentContent(RawContentInfo rawContentInfo)Parameters
| Type | Name | Description | 
|---|---|---|
| RawContentInfo | rawContentInfo | 
Import(ITransferContentData, AccessLevel)
Create a content based on the exported content.
Declaration
public virtual ContentReference Import(ITransferContentData content, AccessLevel requiredDestinationAccess)Parameters
| Type | Name | Description | 
|---|---|---|
| ITransferContentData | content | The exported content. | 
| AccessLevel | requiredDestinationAccess | The required destination access. | 
Returns
| Type | Description | 
|---|---|
| ContentReference | A content referense for the imported content. | 
ImportContentLanguage(ContentReference, RawContent, AccessLevel)
Imports the page languages.
Declaration
protected virtual void ImportContentLanguage(ContentReference destinationLink, RawContent content, AccessLevel requiredDestinationAccess)Parameters
| Type | Name | Description | 
|---|---|---|
| ContentReference | destinationLink | The destination link. | 
| RawContent | content | 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(IContent, RawContent)
Imports the properties.
Declaration
public virtual void ImportProperties(IContent newContent, RawContent importedContent)Parameters
| Type | Name | Description | 
|---|---|---|
| IContent | newContent | The page to import properties from. | 
| RawContent | importedContent | The imported page. | 
ImportProperty(RawContent, RawProperty, PropertyData)
Imports a specific raw property.
Declaration
public virtual void ImportProperty(RawContent contextContent, RawProperty importedProp, PropertyData propDestination)Parameters
| Type | Name | Description | 
|---|---|---|
| RawContent | contextContent | 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 | 
