SaaS CMS has officially launched! Learn more now.

Class EntryContentBaseCommitter

This type/member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Commits changes for EntryContentBase instances to the ECF database.

Inheritance
System.Object
EntryContentBaseCommitter
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.Commerce.Catalog.Provider.Persistence
Assembly: EPiServer.Business.Commerce.dll
Version: 11.8.3
Syntax
public class EntryContentBaseCommitter : ICatalogContentCommitter
Remarks

This committer works with published version only. Use the ContentVersionCommitter to work with draft version.

Constructors

EntryContentBaseCommitter(ICatalogSystem, ReferenceConverter, CatalogContentLoader, ParentEvaluator, UniqueValueGenerator, MetaDataCommitter, ILinksRepository, IAssetService, MetaClassToContentTypeMap)

Declaration
[Obsolete("Use constructor with IApplicationContext instead. Will remain at least until July 2017.")]
public EntryContentBaseCommitter(ICatalogSystem catalogContext, ReferenceConverter referenceConverter, CatalogContentLoader contentLoader, ParentEvaluator parentEvaluator, UniqueValueGenerator uniqueValueGenerator, MetaDataCommitter metaDataCommitter, ILinksRepository linksRepository, IAssetService assetService, MetaClassToContentTypeMap metaClassToContentTypeMap)
Parameters
Type Name Description
ICatalogSystem catalogContext
ReferenceConverter referenceConverter
CatalogContentLoader contentLoader
ParentEvaluator parentEvaluator
UniqueValueGenerator uniqueValueGenerator
MetaDataCommitter metaDataCommitter
ILinksRepository linksRepository
IAssetService assetService
MetaClassToContentTypeMap metaClassToContentTypeMap

EntryContentBaseCommitter(ICatalogSystem, ReferenceConverter, CatalogContentLoader, ParentEvaluator, UniqueValueGenerator, MetaDataCommitter, ILinksRepository, IAssetService, MetaClassToContentTypeMap, ApplicationContext)

Declaration
[Obsolete("Use constructor with IApplicationContext instead. Will remain at least until July 2017.")]
public EntryContentBaseCommitter(ICatalogSystem catalogContext, ReferenceConverter referenceConverter, CatalogContentLoader contentLoader, ParentEvaluator parentEvaluator, UniqueValueGenerator uniqueValueGenerator, MetaDataCommitter metaDataCommitter, ILinksRepository linksRepository, IAssetService assetService, MetaClassToContentTypeMap metaClassToContentTypeMap, ApplicationContext applicationContext)
Parameters
Type Name Description
ICatalogSystem catalogContext
ReferenceConverter referenceConverter
CatalogContentLoader contentLoader
ParentEvaluator parentEvaluator
UniqueValueGenerator uniqueValueGenerator
MetaDataCommitter metaDataCommitter
ILinksRepository linksRepository
IAssetService assetService
MetaClassToContentTypeMap metaClassToContentTypeMap
ApplicationContext applicationContext

EntryContentBaseCommitter(ICatalogSystem, ReferenceConverter, CatalogContentLoader, ParentEvaluator, UniqueValueGenerator, MetaDataCommitter, ILinksRepository, IAssetService, MetaClassToContentTypeMap, IApplicationContext)

Declaration
[Obsolete("Use constructor with CatalogContentMoveHandler instead. Will remain at least until September 2017.")]
public EntryContentBaseCommitter(ICatalogSystem catalogContext, ReferenceConverter referenceConverter, CatalogContentLoader contentLoader, ParentEvaluator parentEvaluator, UniqueValueGenerator uniqueValueGenerator, MetaDataCommitter metaDataCommitter, ILinksRepository linksRepository, IAssetService assetService, MetaClassToContentTypeMap metaClassToContentTypeMap, IApplicationContext applicationContext)
Parameters
Type Name Description
ICatalogSystem catalogContext
ReferenceConverter referenceConverter
CatalogContentLoader contentLoader
ParentEvaluator parentEvaluator
UniqueValueGenerator uniqueValueGenerator
MetaDataCommitter metaDataCommitter
ILinksRepository linksRepository
IAssetService assetService
MetaClassToContentTypeMap metaClassToContentTypeMap
IApplicationContext applicationContext

EntryContentBaseCommitter(ICatalogSystem, ReferenceConverter, CatalogContentLoader, ParentEvaluator, UniqueValueGenerator, MetaDataCommitter, IRelationRepository, IAssetService, MetaClassToContentTypeMap, IApplicationContext, CatalogContentMoveHandler)

Initializes a new instance of the EntryContentBaseCommitter class.

Declaration
public EntryContentBaseCommitter(ICatalogSystem catalogContext, ReferenceConverter referenceConverter, CatalogContentLoader contentLoader, ParentEvaluator parentEvaluator, UniqueValueGenerator uniqueValueGenerator, MetaDataCommitter metaDataCommitter, IRelationRepository relationRepository, IAssetService assetService, MetaClassToContentTypeMap metaClassToContentTypeMap, IApplicationContext applicationContext, CatalogContentMoveHandler catalogContentMoveHandler)
Parameters
Type Name Description
ICatalogSystem catalogContext

The catalog context.

ReferenceConverter referenceConverter

The reference converter.

CatalogContentLoader contentLoader

The content loader.

ParentEvaluator parentEvaluator

The parent evaluator.

UniqueValueGenerator uniqueValueGenerator

The unique value generator.

MetaDataCommitter metaDataCommitter

The meta data committer.

IRelationRepository relationRepository

The relation repository.

IAssetService assetService

The asset service.

MetaClassToContentTypeMap metaClassToContentTypeMap

The meta class to content type map.

IApplicationContext applicationContext

The application context.

CatalogContentMoveHandler catalogContentMoveHandler

The catalog content move handler.

Properties

ForContentType

Gets the type the committer can commit.

Declaration
public CatalogContentType ForContentType { get; }
Property Value
Type Description
CatalogContentType

CatalogContentType

Methods

CommitAssets(EntryContentBase, CatalogEntryDto)

This type/member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Commits the assets.

Declaration
protected virtual CatalogEntryDto CommitAssets(EntryContentBase content, CatalogEntryDto entry)
Parameters
Type Name Description
EntryContentBase content

The content.

CatalogEntryDto entry

The entry.

Returns
Type Description
CatalogEntryDto

CreateNew(EntryContentBase)

Creates a new entry corresponding to the content.

Declaration
protected virtual int CreateNew(EntryContentBase content)
Parameters
Type Name Description
EntryContentBase content

The content.

Returns
Type Description
System.Int32

The ID of the new entry.

CreateNew(EntryContentBase, Boolean)

Creates a new entry corresponding to the content.

Declaration
protected virtual int CreateNew(EntryContentBase content, bool syncDraft)
Parameters
Type Name Description
EntryContentBase content

The content.

System.Boolean syncDraft

Flag to indicate whether the saved content will be synced back to content provider.

Returns
Type Description
System.Int32

The ID of the new entry.

Delete(ContentReference)

Deletes specific entry content.

Declaration
public virtual void Delete(ContentReference contentLink)
Parameters
Type Name Description
EPiServer.Core.ContentReference contentLink

The entry content link.

Save(CatalogContentBase)

This type/member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Saves the specified content, new or updated.

Declaration
public virtual ContentReference Save(CatalogContentBase content)
Parameters
Type Name Description
CatalogContentBase content

The content.

Returns
Type Description
EPiServer.Core.ContentReference

The content reference, newly generated if the content was new.

Remarks

By default, content will be synced back to content provider. In order prevent this, use the overload method with syncDraft flag instead, or modify the DisableVersionSync app setting.

Exceptions
Type Condition
System.ArgumentException

This class only supports content of the type specified by ForContentType.

Save(CatalogContentBase, Boolean)

This type/member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Saves the specified content, new or updated.

Declaration
public virtual ContentReference Save(CatalogContentBase content, bool syncDraft)
Parameters
Type Name Description
CatalogContentBase content

The content.

System.Boolean syncDraft

Flag to indicate whether the saved content will be synced back to content provider.

Returns
Type Description
EPiServer.Core.ContentReference

The content reference, newly generated if the content was new.

Exceptions
Type Condition
System.ArgumentException

This class only supports content of the type specified by ForContentType.

SetRelations(ParentsInfo, Int32)

This type/member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Sets the relations to the parent category, if one is selected, and to parent entry if the content is a variation of a product or part of a bundle or package.

Declaration
protected virtual void SetRelations(ParentsInfo parentsInfo, int entryId)
Parameters
Type Name Description
ParentsInfo parentsInfo

The parents info.

System.Int32 entryId

The entry id.

SetSeoData(EntryContentBase, CatalogEntryDto)

Sets the seo data.

Declaration
protected virtual void SetSeoData(EntryContentBase content, CatalogEntryDto entry)
Parameters
Type Name Description
EntryContentBase content

The content.

CatalogEntryDto entry

The entry.

SetVariationData(EntryContentBase, CatalogEntryDto)

Sets the variation data.

Declaration
protected virtual void SetVariationData(EntryContentBase content, CatalogEntryDto entry)
Parameters
Type Name Description
EntryContentBase content

The content.

CatalogEntryDto entry

The entry.

UpdateExisting(EntryContentBase, Int32)

Updates an existing entry.

Declaration
protected virtual void UpdateExisting(EntryContentBase content, int entryId)
Parameters
Type Name Description
EntryContentBase content

The entry.

System.Int32 entryId

The entry id.

UpdateExisting(EntryContentBase, Int32, Boolean)

Updates an existing entry.

Declaration
protected virtual void UpdateExisting(EntryContentBase content, int entryId, bool syncDraft)
Parameters
Type Name Description
EntryContentBase content

The entry.

System.Int32 entryId

The entry id.

System.Boolean syncDraft

Flag to indicate whether the saved content will be synced back to content provider.

UpdateStaticAttributes(EntryContentBase, CatalogEntryDto)

Updates the static attributes.

Declaration
protected virtual CatalogEntryDto UpdateStaticAttributes(EntryContentBase content, CatalogEntryDto entry)
Parameters
Type Name Description
EntryContentBase content

The content.

CatalogEntryDto entry

The entry.

Returns
Type Description
CatalogEntryDto

ValidateCode(String, Int32)

Validates the code.

Declaration
protected virtual void ValidateCode(string code, int entryId = 0)
Parameters
Type Name Description
System.String code

The code.

System.Int32 entryId

The entry Id.

Exceptions
Type Condition
System.ArgumentException

Thrown if the code is not unique.

Implements