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

Class DefaultDataImporter

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Import pages from binary format

Inheritance
System.Object
DefaultDataImporter
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.Enterprise.Internal
Assembly: EPiServer.Enterprise.dll
Version: 10.10.4
Syntax
[ServiceConfiguration(typeof(IDataImporter), Lifecycle = ServiceInstanceScope.Transient)]
public class DefaultDataImporter : ExportImportBase, ITransferContext, IContentTransferContext, ITransferHandlerContext, IDataImporter
Examples

An example that demonstrates how to import a package that has been exported with the DataExporter class. The package is imported directly under the root page in the destination site.

Constructors

DefaultDataImporter()

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the DefaultDataImporter class

Declaration
public DefaultDataImporter()

DefaultDataImporter(IContentCacheRemover, IPrincipalAccessor, IDataImportEvents, IDataImportEventsRaiser, IContentRepository, IPermanentLinkMapper, IContentTypeRepository, ContentTypeAvailabilityService, IAvailableSettingsRepository, IContentImporter, IContentTransferValidator, PropertyCategoryTransform, ContentRootRepository, ISiteDefinitionRepository, ContentOptions)

Declaration
public DefaultDataImporter(IContentCacheRemover contentCacheRemover, IPrincipalAccessor principalAccessor, IDataImportEvents dataImportEvents, IDataImportEventsRaiser eventRaiser, IContentRepository contentRepository, IPermanentLinkMapper permanentLinkMapper, IContentTypeRepository contentTypeRepository, ContentTypeAvailabilityService contentTypeAvailabilityService, IAvailableSettingsRepository availableSettingsRepository, IContentImporter contentImporter, IContentTransferValidator contentTransferValidator, PropertyCategoryTransform categoryTransform, ContentRootRepository contentRootRepository, ISiteDefinitionRepository siteDefinitionRepository, ContentOptions contentOptions)
Parameters
Type Name Description
IContentCacheRemover contentCacheRemover
IPrincipalAccessor principalAccessor
IDataImportEvents dataImportEvents
IDataImportEventsRaiser eventRaiser
IContentRepository contentRepository
IPermanentLinkMapper permanentLinkMapper
IContentTypeRepository contentTypeRepository
ContentTypeAvailabilityService contentTypeAvailabilityService
IAvailableSettingsRepository availableSettingsRepository
IContentImporter contentImporter
IContentTransferValidator contentTransferValidator
PropertyCategoryTransform categoryTransform
ContentRootRepository contentRootRepository
ISiteDefinitionRepository siteDefinitionRepository
ContentOptions contentOptions

Properties

AutoDetectCulture

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets or sets a value indicating whether [auto detect culture].

Declaration
public bool AutoDetectCulture { get; set; }
Property Value
Type Description
System.Boolean

true if [auto detect culture]; otherwise, false.

IgnoreDynamicProperties

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. If dynamic properties in import packages should be ignored

Declaration
public bool? IgnoreDynamicProperties { get; set; }
Property Value
Type Description
System.Nullable<System.Boolean>

If value is not set the default value will be based on if dynamic properties are enabled or not in configuration

ImportedVppFiles

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets or sets a value indicating whether the importer imported vpp based files.

Declaration
public bool ImportedVppFiles { get; set; }
Property Value
Type Description
System.Boolean

true if vpp based files where imported; otherwise, false.

NumberOfPagesToImport

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets or sets the all the pages to import.

Declaration
public int NumberOfPagesToImport { get; }
Property Value
Type Description
System.Int32

The number of pages to import.

NumberOfVisitorGroupToImport

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets or sets the number of visitor group to import.

Declaration
public int NumberOfVisitorGroupToImport { get; }
Property Value
Type Description
System.Int32

The number of visitor group to import.

Status

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice.

Declaration
public IImportStatus Status { get; }
Property Value
Type Description
IImportStatus

Methods

ExsistLegacyFileInThePackage()

Declaration
public virtual bool ExsistLegacyFileInThePackage()
Returns
Type Description
System.Boolean

Import(ImportOptions)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Execute the import.

Declaration
public virtual void Import(ImportOptions options)
Parameters
Type Name Description
ImportOptions options

Import(Stream, ContentReference, ImportOptions)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice.

Declaration
public ITransferLog Import(Stream stream, ContentReference destinationRoot, ImportOptions options)
Parameters
Type Name Description
System.IO.Stream stream

The stream to the import package

ContentReference destinationRoot

The root where content items will be imported under

ImportOptions options

Options that specify settings for the import

Returns
Type Description
ITransferLog

A logger with result

Remarks

Potential errors and warnings are logged to returned logger

Continuous progress can be retreieved from Status.

ImportFile(IFileTransferObject, ZipPackage)

Declaration
protected void ImportFile(IFileTransferObject metaData, ZipPackage package)
Parameters
Type Name Description
IFileTransferObject metaData
System.IO.Packaging.ZipPackage package

InternalImportLive(IFileTransferObject, ZipPackage)

Declaration
protected void InternalImportLive(IFileTransferObject metaData, ZipPackage package)
Parameters
Type Name Description
IFileTransferObject metaData
System.IO.Packaging.ZipPackage package

OnImportProperty(TransformPropertyEventArgs)

Declaration
public override void OnImportProperty(TransformPropertyEventArgs e)
Parameters
Type Name Description
TransformPropertyEventArgs e
Overrides

ResolveFileTransferType(String)

Declaration
protected virtual Type ResolveFileTransferType(string xmlElementName)
Parameters
Type Name Description
System.String xmlElementName
Returns
Type Description
System.Type

Implements

Extension Methods