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

Class ContentSaveDB

Handles all database modification of page data.

Inheritance
System.Object
ContentSaveDB
Inherited Members
Namespace: EPiServer.DataAccess.Internal
Assembly: EPiServer.dll
Version: 12.0.3
Syntax
[ServiceConfiguration]
public class ContentSaveDB : ContentDB

Constructors

ContentSaveDB(ServiceAccessor<IDatabaseExecutor>, IContentTypeRepository, IPermanentLinkMapper, ILanguageBranchRepository, IPropertyDefinitionRepository, IPropertyDefinitionTypeRepository, IPropertyDataFactory, IContentFactory, DefaultContentVersionRepository, ServiceAccessor<CategoryDB>, IBlobFactory, PropertyValueConverterFactory, DatabaseDateTimeHandler, IContentVersionResolver, IStatusTransitionEvaluator, ITimeProvider, IPropertyBlockBuilder)

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

Declaration
public ContentSaveDB(ServiceAccessor<IDatabaseExecutor> databaseHandlerAccessor, IContentTypeRepository contentTypeRepository, IPermanentLinkMapper permanentLinkMapper, ILanguageBranchRepository languageBranchRepository, IPropertyDefinitionRepository propertyDefinitionRepository, IPropertyDefinitionTypeRepository propertyDefinitionTypeRepsoitory, IPropertyDataFactory propertyDataFactory, IContentFactory contentFactory, DefaultContentVersionRepository contentVersionRepository, ServiceAccessor<CategoryDB> categoryDataAccess, IBlobFactory blobFactory, PropertyValueConverterFactory propertyValueConverterFactory, DatabaseDateTimeHandler dateTimeHandler, IContentVersionResolver contentVersionResolver, IStatusTransitionEvaluator statusTransitionEvaluator, ITimeProvider timeProvider, IPropertyBlockBuilder propertyBlockBuilder)
Parameters
Type Name Description
ServiceAccessor<IDatabaseExecutor> databaseHandlerAccessor
IContentTypeRepository contentTypeRepository
IPermanentLinkMapper permanentLinkMapper
ILanguageBranchRepository languageBranchRepository
IPropertyDefinitionRepository propertyDefinitionRepository
IPropertyDefinitionTypeRepository propertyDefinitionTypeRepsoitory
IPropertyDataFactory propertyDataFactory
IContentFactory contentFactory
DefaultContentVersionRepository contentVersionRepository
ServiceAccessor<CategoryDB> categoryDataAccess
IBlobFactory blobFactory
PropertyValueConverterFactory propertyValueConverterFactory
DatabaseDateTimeHandler dateTimeHandler
IContentVersionResolver contentVersionResolver
IStatusTransitionEvaluator statusTransitionEvaluator
ITimeProvider timeProvider
IPropertyBlockBuilder propertyBlockBuilder

Fields

UseIChangeTrackingChangedByKey

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

Declaration
public const string UseIChangeTrackingChangedByKey = "PageSaveDB:ChangedBy"
Field Value
Type Description
System.String

UseIChangeTrackingSavedKey

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

Declaration
public const string UseIChangeTrackingSavedKey = "PageSaveDB:PageSaved"
Field Value
Type Description
System.String

Properties

ContentVersionRepository

Gets or sets the content version repository.

Declaration
protected DefaultContentVersionRepository ContentVersionRepository { get; set; }
Property Value
Type Description
DefaultContentVersionRepository

The content version repository.

UsePageDataChangedBy

Indicates if the saved by stored in db is taken from PageData instance or set by current user. If true SavedBy property on PageData instance is used else is current user.

Declaration
public static bool UsePageDataChangedBy { get; }
Property Value
Type Description
System.Boolean

UsePageDataSaveTime

Indicates if the save time stored in db is taken from PageData instance or set by PageSaveDB. If true PageSaved property on PageData instance is used else is time set as DateTime.Now.

Declaration
public static bool UsePageDataSaveTime { get; }
Property Value
Type Description
System.Boolean

Methods

Delete(ContentReference, Boolean)

Delete content from database

Declaration
public void Delete(ContentReference contentLink, bool forceDelete)
Parameters
Type Name Description
ContentReference contentLink

The link to the content which will be deleted

System.Boolean forceDelete

Delete content even if being linked by other pages

DeleteChildren(ContentReference, Boolean)

Delete children from database. This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public void DeleteChildren(ContentReference contentLink, bool forceDelete)
Parameters
Type Name Description
ContentReference contentLink

The children of this content will be deleted.

System.Boolean forceDelete

Delete even if referenced by other pages.

DeleteLanguage(ContentReference, String)

Delete a language branch of a content object This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public void DeleteLanguage(ContentReference contentLink, string languageBranch)
Parameters
Type Name Description
ContentReference contentLink

Link to content for which the language should be deleted

System.String languageBranch

The language branch to delete

Remarks

The published version cannot be deleted

GetReferenceInformationForChildren(ContentReference)

Gets the reference information for children.

Declaration
public IEnumerable<ReferenceInformation> GetReferenceInformationForChildren(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The content link.

Returns
Type Description
System.Collections.Generic.IEnumerable<ReferenceInformation>

GetReferenceInformationForContent(ContentReference, Boolean)

Gets the content of the reference information for.

Declaration
public IEnumerable<ReferenceInformation> GetReferenceInformationForContent(ContentReference contentLink, bool includeDecendents)
Parameters
Type Name Description
ContentReference contentLink

The content link.

System.Boolean includeDecendents

if set to true [include decendents].

Returns
Type Description
System.Collections.Generic.IEnumerable<ReferenceInformation>

Move(ContentReference, ContentReference)

Move a content object to another container This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public void Move(ContentReference contentLink, ContentReference destinationLink)
Parameters
Type Name Description
ContentReference contentLink

The link to the content to move

ContentReference destinationLink

The container to which the content will be moved

Move(Int32, Int32, Boolean)

Move a content object to another container This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public void Move(int contentLinkID, int destinationLinkID, bool archive)
Parameters
Type Name Description
System.Int32 contentLinkID

The link to the content to move

System.Int32 destinationLinkID

The container to which the content will be moved

System.Boolean archive

Set to True if the content is archived.

Remarks

Archiving the content will move it to its Archve page and remove the stop publishing date.

MoveToWastebasket(ContentReference, String)

Move a content object to the wastebasket This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public void MoveToWastebasket(ContentReference contentLink, string deletedBy)
Parameters
Type Name Description
ContentReference contentLink

The link to the content to move

System.String deletedBy

The deleted by.

Save(IContent, SaveAction, String)

Save page to database This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public virtual ContentReference Save(IContent content, SaveAction action, string currentUser)
Parameters
Type Name Description
IContent content

The content.

SaveAction action

Action that will be performed

System.String currentUser

Name of the user performing this operation

Returns
Type Description
ContentReference
Remarks

If PageLink is empty a new page will be created

Extension Methods