November Happy Hour will be moved to Thursday December 5th.

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
System.Object
ContentTransfer
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Core.Transfer
Assembly: EPiServer.dll
Version: 9.12.2
Syntax
[ServiceConfiguration(typeof(IContentTransfer))]
public class ContentTransfer : IContentTransfer

Constructors

ContentTransfer(IContentRepository, IPermanentLinkMapper, IContentTypeRepository, IContentProviderManager, RawContentRetriever, IPageQuickSearch, IPropertyDefinitionTypeRepository, ContentFactory, BlobFactory, IDependentContentTransfer, ContentLanguageSettingRepository)

Initializes a new instance of the ContentTransfer class.

Declaration
[Obsolete("Use alternative constructor")]
public ContentTransfer(IContentRepository contentRepository, IPermanentLinkMapper permanentLinkMapper, IContentTypeRepository contentTypeRepository, IContentProviderManager pageProviderManager, RawContentRetriever rawContentRetriever, IPageQuickSearch pageQuickSearcher, IPropertyDefinitionTypeRepository propertyDefinitionTypeRepository, ContentFactory contentFactory, BlobFactory blobFactory, IDependentContentTransfer dependentContentTransfer, ContentLanguageSettingRepository settingsRepository)
Parameters
Type Name Description
IContentRepository contentRepository
IPermanentLinkMapper permanentLinkMapper
IContentTypeRepository contentTypeRepository
IContentProviderManager pageProviderManager
RawContentRetriever rawContentRetriever
IPageQuickSearch pageQuickSearcher
IPropertyDefinitionTypeRepository propertyDefinitionTypeRepository
ContentFactory contentFactory
BlobFactory blobFactory
IDependentContentTransfer dependentContentTransfer
ContentLanguageSettingRepository settingsRepository

ContentTransfer(IContentRepository, IPermanentLinkMapper, IContentTypeRepository, IContentProviderManager, RawContentRetriever, IPageQuickSearch, IPropertyDefinitionTypeRepository, ContentFactory, BlobFactory, IDependentContentTransfer, ContentLanguageSettingRepository, IContentCacheRemover, IContentCacheListingRemover)

Initializes a new instance of the ContentTransfer class.

Declaration
[Obsolete("Use alternative constructor")]
public ContentTransfer(IContentRepository contentRepository, IPermanentLinkMapper permanentLinkMapper, IContentTypeRepository contentTypeRepository, IContentProviderManager pageProviderManager, RawContentRetriever rawContentRetriever, IPageQuickSearch pageQuickSearcher, IPropertyDefinitionTypeRepository propertyDefinitionTypeRepository, ContentFactory contentFactory, BlobFactory blobFactory, IDependentContentTransfer dependentContentTransfer, ContentLanguageSettingRepository settingsRepository, IContentCacheRemover contentCacheRemover, IContentCacheListingRemover contentCacheListingRemover)
Parameters
Type Name Description
IContentRepository contentRepository
IPermanentLinkMapper permanentLinkMapper
IContentTypeRepository contentTypeRepository
IContentProviderManager pageProviderManager
RawContentRetriever rawContentRetriever
IPageQuickSearch pageQuickSearcher
IPropertyDefinitionTypeRepository propertyDefinitionTypeRepository
ContentFactory contentFactory
BlobFactory blobFactory
IDependentContentTransfer dependentContentTransfer
ContentLanguageSettingRepository settingsRepository
IContentCacheRemover contentCacheRemover
IContentCacheListingRemover contentCacheListingRemover

ContentTransfer(IContentRepository, IPermanentLinkMapper, IContentTypeRepository, IContentProviderManager, RawContentRetriever, IPageQuickSearch, IPropertyDefinitionTypeRepository, ContentFactory, BlobFactory, IDependentContentTransfer, ContentLanguageSettingRepository, IContentCacheRemover, IContentCacheListingRemover, IPrincipalAccessor)

Initializes a new instance of the ContentTransfer class.

Declaration
[Obsolete("Use alternative constructor")]
public ContentTransfer(IContentRepository contentRepository, IPermanentLinkMapper permanentLinkMapper, IContentTypeRepository contentTypeRepository, IContentProviderManager pageProviderManager, RawContentRetriever rawContentRetriever, IPageQuickSearch pageQuickSearcher, IPropertyDefinitionTypeRepository propertyDefinitionTypeRepository, ContentFactory contentFactory, BlobFactory blobFactory, IDependentContentTransfer dependentContentTransfer, ContentLanguageSettingRepository settingsRepository, IContentCacheRemover contentCacheRemover, IContentCacheListingRemover contentCacheListingRemover, IPrincipalAccessor principalAccessor)
Parameters
Type Name Description
IContentRepository contentRepository
IPermanentLinkMapper permanentLinkMapper
IContentTypeRepository contentTypeRepository
IContentProviderManager pageProviderManager
RawContentRetriever rawContentRetriever
IPageQuickSearch pageQuickSearcher
IPropertyDefinitionTypeRepository propertyDefinitionTypeRepository
ContentFactory contentFactory
BlobFactory blobFactory
IDependentContentTransfer dependentContentTransfer
ContentLanguageSettingRepository settingsRepository
IContentCacheRemover contentCacheRemover
IContentCacheListingRemover contentCacheListingRemover
IPrincipalAccessor principalAccessor

ContentTransfer(IContentRepository, IPermanentLinkMapper, IContentTypeRepository, IContentProviderManager, RawContentRetriever, IPageQuickSearch, IPropertyDefinitionTypeRepository, IContentFactory, BlobFactory, IDependentContentTransfer, ContentLanguageSettingRepository, IContentCacheRemover, IContentCacheListingRemover, IPrincipalAccessor)

Initializes a new instance of the ContentTransfer class.

Declaration
[Obsolete("Use alternative constructor")]
public ContentTransfer(IContentRepository contentRepository, IPermanentLinkMapper permanentLinkMapper, IContentTypeRepository contentTypeRepository, IContentProviderManager pageProviderManager, RawContentRetriever rawContentRetriever, IPageQuickSearch pageQuickSearcher, IPropertyDefinitionTypeRepository propertyDefinitionTypeRepository, IContentFactory contentFactory, BlobFactory blobFactory, IDependentContentTransfer dependentContentTransfer, ContentLanguageSettingRepository settingsRepository, IContentCacheRemover contentCacheRemover, IContentCacheListingRemover contentCacheListingRemover, IPrincipalAccessor principalAccessor)
Parameters
Type Name Description
IContentRepository contentRepository
IPermanentLinkMapper permanentLinkMapper
IContentTypeRepository contentTypeRepository
IContentProviderManager pageProviderManager
RawContentRetriever rawContentRetriever
IPageQuickSearch pageQuickSearcher
IPropertyDefinitionTypeRepository propertyDefinitionTypeRepository
IContentFactory contentFactory
BlobFactory blobFactory
IDependentContentTransfer dependentContentTransfer
ContentLanguageSettingRepository settingsRepository
IContentCacheRemover contentCacheRemover
IContentCacheListingRemover contentCacheListingRemover
IPrincipalAccessor principalAccessor

ContentTransfer(IContentRepository, IPermanentLinkMapper, IContentTypeRepository, IContentProviderManager, RawContentRetriever, IPageQuickSearch, IPropertyDefinitionTypeRepository, IContentFactory, IBlobFactory, IDependentContentTransfer, ContentLanguageSettingRepository, IContentCacheRemover, IContentCacheListingRemover, IPrincipalAccessor)

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, IContentFactory contentFactory, IBlobFactory blobFactory, IDependentContentTransfer dependentContentTransfer, ContentLanguageSettingRepository settingsRepository, IContentCacheRemover contentCacheRemover, IContentCacheListingRemover contentCacheListingRemover, IPrincipalAccessor principalAccessor)
Parameters
Type Name Description
IContentRepository contentRepository
IPermanentLinkMapper permanentLinkMapper
IContentTypeRepository contentTypeRepository
IContentProviderManager pageProviderManager
RawContentRetriever rawContentRetriever
IPageQuickSearch pageQuickSearcher
IPropertyDefinitionTypeRepository propertyDefinitionTypeRepository
IContentFactory contentFactory
IBlobFactory blobFactory
IDependentContentTransfer dependentContentTransfer
ContentLanguageSettingRepository settingsRepository
IContentCacheRemover contentCacheRemover
IContentCacheListingRemover contentCacheListingRemover
IPrincipalAccessor principalAccessor

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.

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.

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

Implements

Extension Methods