Class DefaultDataExporter
Export pages to ziped XML format.
Implements
Inherited Members
Namespace: EPiServer.Enterprise.Internal
Assembly: EPiServer.Enterprise.dll
Version: 12.0.3Syntax
[ServiceConfiguration]
[ServiceConfiguration]
public class DefaultDataExporter : ExportImportBase, ITransferContext, IContentTransferContext, ITransferHandlerContext, IDataExporter, IDisposable
Constructors
DefaultDataExporter()
Initializes a new instance of the DefaultDataExporter
Declaration
public DefaultDataExporter()
DefaultDataExporter(IDataExportEventsRaiser, IDataExportEvents, IContentCacheKeyCreator, ISynchronizedObjectInstanceCache, IContentRepository, IPermanentLinkMapper, IContentTypeRepository, IContentProviderManager, ContentTypeAvailabilityService, IAvailableSettingsRepository, IContentExporter, PropertyCategoryTransform, ContentRootRepository, ISiteDefinitionRepository, IMimeTypeResolver)
Initializes the DefaultDataExporter class. And set up the default property transform event handlers for export.
Declaration
public DefaultDataExporter(IDataExportEventsRaiser eventRegister, IDataExportEvents exportEvents, IContentCacheKeyCreator contentCacheKeyCreator, ISynchronizedObjectInstanceCache cacheInstance, IContentRepository contentRepository, IPermanentLinkMapper permanentLinkMapper, IContentTypeRepository contentTypeRepository, IContentProviderManager contentProviderManager, ContentTypeAvailabilityService contentTypeAvailabilityService, IAvailableSettingsRepository availableSettingsRepository, IContentExporter contentExporter, PropertyCategoryTransform categoryTransform, ContentRootRepository contentRootRepository, ISiteDefinitionRepository siteDefinitionRepository, IMimeTypeResolver mimeTypeResolver)
Parameters
Type | Name | Description |
---|---|---|
IDataExportEventsRaiser | eventRegister | |
IDataExportEvents | exportEvents | |
IContentCacheKeyCreator | contentCacheKeyCreator | |
ISynchronizedObjectInstanceCache | cacheInstance | |
IContentRepository | contentRepository | |
IPermanentLinkMapper | permanentLinkMapper | |
IContentTypeRepository | contentTypeRepository | |
IContentProviderManager | contentProviderManager | |
ContentTypeAvailabilityService | contentTypeAvailabilityService | |
IAvailableSettingsRepository | availableSettingsRepository | |
IContentExporter | contentExporter | |
PropertyCategoryTransform | categoryTransform | |
ContentRootRepository | contentRootRepository | |
ISiteDefinitionRepository | siteDefinitionRepository | |
IMimeTypeResolver | mimeTypeResolver |
Fields
CategoryKey
Declaration
public const string CategoryKey = "Category"
Field Value
Type | Description |
---|---|
System.String |
ContentLanguageKey
Declaration
public const string ContentLanguageKey = "ContentLanguage"
Field Value
Type | Description |
---|---|
System.String |
ContentTypeKey
Declaration
public const string ContentTypeKey = "ContentType"
Field Value
Type | Description |
---|---|
System.String |
DynamicPropertyKey
Declaration
public const string DynamicPropertyKey = "DynamicProperty"
Field Value
Type | Description |
---|---|
System.String |
ExporterVersion
The exported file version.
Declaration
public const int ExporterVersion = 4
Field Value
Type | Description |
---|---|
System.Int32 |
FrameKey
Declaration
public const string FrameKey = "Frame"
Field Value
Type | Description |
---|---|
System.String |
TabDefinitionKey
Declaration
public const string TabDefinitionKey = "TabDefinition"
Field Value
Type | Description |
---|---|
System.String |
VisitorGroupKey
Declaration
public const string VisitorGroupKey = "VisitorGroup"
Field Value
Type | Description |
---|---|
System.String |
Properties
Culture
Gets or sets the culture to use.
Declaration
public CultureInfo Culture { get; set; }
Property Value
Type | Description |
---|---|
System.Globalization.CultureInfo | The culture. |
ExportableItems
Can be used to add instances to the export package
Declaration
public IDictionary<string, IList> ExportableItems { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.Collections.IList> | A collection that instances can be added to |
Remarks
Supported key/types are ContentType/ContentType, Category/Category, TabDefinition/TabDefinition, Frame/Frame and ContentLanguages/System.Globalization.CultureInfo.
NumberOfExportedCategories
Declaration
public int NumberOfExportedCategories { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
NumberOfExportedContentTypes
Declaration
public int NumberOfExportedContentTypes { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
NumberOfExportedDynamicProperties
Declaration
public int NumberOfExportedDynamicProperties { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
NumberOfExportedFrames
Declaration
public int NumberOfExportedFrames { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
NumberOfExportedTabs
Declaration
public int NumberOfExportedTabs { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
NumberOfExportedVisitorGroup
Gets or sets the number of exported visitor group.
Declaration
public int NumberOfExportedVisitorGroup { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The number of exported visitor group. |
RequiredSourceAccess
Gets or sets the required access level for page exporting.
Declaration
public AccessLevel RequiredSourceAccess { get; set; }
Property Value
Type | Description |
---|---|
AccessLevel | The required source access. |
Status
Gets status information about the ongoing export job
Declaration
public IExportStatus Status { get; }
Property Value
Type | Description |
---|---|
IExportStatus |
Methods
Close()
Closes the under laying XML writer.
Declaration
public void Close()
Dispose()
Disposes the exporter and close the under laying XML writer.
Declaration
public void Dispose()
Export(TransferExportOptions)
Starting the export. The export can be done several times to empty the exporter.
Declaration
public void Export(TransferExportOptions options)
Parameters
Type | Name | Description |
---|---|---|
TransferExportOptions | options |
Export(Stream, IEnumerable<ExportSource>, ExportOptions)
Export the specified data to an export package specified by System.IO.Stream
Declaration
public ITransferLog Export(Stream stream, IEnumerable<ExportSource> sourceRoots, ExportOptions options)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream to where the export packages is saved |
System.Collections.Generic.IEnumerable<ExportSource> | sourceRoots | The list of content roots to export |
ExportOptions | options | Specify settings for how the export should be done |
Returns
Type | Description |
---|---|
ITransferLog |
Remarks
Potential errors and warnings are logged to returned logger
Continuous progress can be retreieved from Status.
ExportContent(XmlTextWriter, ContentReference, IContentTransferContext, ITransferContentData)
Exports one content item to the XML writer.
Declaration
protected virtual void ExportContent(XmlTextWriter xml, ContentReference contentToExport, IContentTransferContext context, ITransferContentData transferContent)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlTextWriter | xml | The XML. |
ContentReference | contentToExport | The content to export. |
IContentTransferContext | context | The context. |
ITransferContentData | transferContent | Content of the transfer. |
Finalize()
Declaration
protected override void Finalize()
NotifyDynamicPropertiesExporting(IList<PropertyDefinition>)
Notifies the transfer handlers about transfering of dynamic properties.
Declaration
protected virtual void NotifyDynamicPropertiesExporting(IList<PropertyDefinition> propertyDefinitions)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<PropertyDefinition> | propertyDefinitions | The property definitions. |
NotifyExportHandlers(ITransferContentData)
Notifies the transfer handlers about transfering of page.
Declaration
protected virtual void NotifyExportHandlers(ITransferContentData transferContent)
Parameters
Type | Name | Description |
---|---|---|
ITransferContentData | transferContent | The transfer page. |
NotifyExportHandlers(IEnumerable<ContentType>)
Notifies the transfer handlers about transfering of blocktypes.
Declaration
protected virtual void NotifyExportHandlers(IEnumerable<ContentType> conentTypes)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<ContentType> | conentTypes | The blocktypes. |
OnExportProperty(TransformPropertyEventArgs)
Declaration
public override void OnExportProperty(TransformPropertyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
TransformPropertyEventArgs | e |