Interface ICatalogContentCommitter
This type/member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Describes a class which can save CatalogContentBase instances to their corresponding database format. Specifies what subtype it handles, so the best match can be used.
Namespace: EPiServer.Commerce.Catalog.Provider.Persistence
Assembly: EPiServer.Business.Commerce.dll
Version: 13.30.0Syntax
public interface ICatalogContentCommitter
Properties
ForContentType
Gets the type the committer can commit.
Declaration
CatalogContentType ForContentType { get; }
Property Value
Type | Description |
---|---|
CatalogContentType | CatalogContentType |
Methods
Delete(ContentReference)
Deletes the specified content
Declaration
void Delete(ContentReference contentLink)
Parameters
Type | Name | Description |
---|---|---|
EPiServer.Core.ContentReference | contentLink | The content link to delete |
Save(CatalogContentBase)
Saves the specified content, new or updated.
Declaration
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.
Save(CatalogContentBase, Boolean)
Saves the specified content, new or updated.
Declaration
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. |
Save(IEnumerable<CatalogContentBase>, Boolean)
Saves a batch of content.
Declaration
IEnumerable<ContentReference> Save(IEnumerable<CatalogContentBase> contents, bool syncDraft)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<CatalogContentBase> | contents | The contents. |
System.Boolean | syncDraft | Flag to indicate if this action should sync drafts or not. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<EPiServer.Core.ContentReference> | A list of content references for saved contents, 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.