Class ContentSaveDB
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Handles all database modification of page data.
Inherited Members
Namespace: EPiServer.DataAccess
Assembly: EPiServer.dll
Version: 9.12.2Syntax
[ServiceConfiguration(typeof(ContentSaveDB))]
public class ContentSaveDB : ContentDB
Constructors
ContentSaveDB(IDatabaseHandler, IContentTypeRepository, IPermanentLinkMapper, ILanguageBranchRepository, IPropertyDefinitionRepository, IPropertyDefinitionTypeRepository, IPropertyDataFactory, ContentFactory, DefaultContentVersionRepository, CategoryDB, BlobFactory, PropertyValueConverterFactory, DatabaseDateTimeHandler)
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
[Obsolete("Use alternative constructor")]
public ContentSaveDB(IDatabaseHandler databaseHandler, IContentTypeRepository contentTypeRepository, IPermanentLinkMapper permanentLinkMapper, ILanguageBranchRepository languageBranchRepository, IPropertyDefinitionRepository propertyDefinitionRepository, IPropertyDefinitionTypeRepository propertyDefinitionTypeRepsoitory, IPropertyDataFactory propertyDataFactory, ContentFactory contentFactory, DefaultContentVersionRepository contentVersionRepository, CategoryDB categoryDataAccess, BlobFactory blobFactory, PropertyValueConverterFactory propertyValueConverterFactory, DatabaseDateTimeHandler dateTimeHandler)
Parameters
Type | Name | Description |
---|---|---|
IDatabaseHandler | databaseHandler | |
IContentTypeRepository | contentTypeRepository | |
IPermanentLinkMapper | permanentLinkMapper | |
ILanguageBranchRepository | languageBranchRepository | |
IPropertyDefinitionRepository | propertyDefinitionRepository | |
IPropertyDefinitionTypeRepository | propertyDefinitionTypeRepsoitory | |
IPropertyDataFactory | propertyDataFactory | |
ContentFactory | contentFactory | |
DefaultContentVersionRepository | contentVersionRepository | |
CategoryDB | categoryDataAccess | |
BlobFactory | blobFactory | |
PropertyValueConverterFactory | propertyValueConverterFactory | |
DatabaseDateTimeHandler | dateTimeHandler |
ContentSaveDB(IDatabaseHandler, IContentTypeRepository, IPermanentLinkMapper, ILanguageBranchRepository, IPropertyDefinitionRepository, IPropertyDefinitionTypeRepository, IPropertyDataFactory, IContentFactory, DefaultContentVersionRepository, CategoryDB, BlobFactory, PropertyValueConverterFactory, DatabaseDateTimeHandler)
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
[Obsolete("Use alternative constructor")]
public ContentSaveDB(IDatabaseHandler databaseHandler, IContentTypeRepository contentTypeRepository, IPermanentLinkMapper permanentLinkMapper, ILanguageBranchRepository languageBranchRepository, IPropertyDefinitionRepository propertyDefinitionRepository, IPropertyDefinitionTypeRepository propertyDefinitionTypeRepsoitory, IPropertyDataFactory propertyDataFactory, IContentFactory contentFactory, DefaultContentVersionRepository contentVersionRepository, CategoryDB categoryDataAccess, BlobFactory blobFactory, PropertyValueConverterFactory propertyValueConverterFactory, DatabaseDateTimeHandler dateTimeHandler)
Parameters
Type | Name | Description |
---|---|---|
IDatabaseHandler | databaseHandler | |
IContentTypeRepository | contentTypeRepository | |
IPermanentLinkMapper | permanentLinkMapper | |
ILanguageBranchRepository | languageBranchRepository | |
IPropertyDefinitionRepository | propertyDefinitionRepository | |
IPropertyDefinitionTypeRepository | propertyDefinitionTypeRepsoitory | |
IPropertyDataFactory | propertyDataFactory | |
IContentFactory | contentFactory | |
DefaultContentVersionRepository | contentVersionRepository | |
CategoryDB | categoryDataAccess | |
BlobFactory | blobFactory | |
PropertyValueConverterFactory | propertyValueConverterFactory | |
DatabaseDateTimeHandler | dateTimeHandler |
ContentSaveDB(IDatabaseHandler, IContentTypeRepository, IPermanentLinkMapper, ILanguageBranchRepository, IPropertyDefinitionRepository, IPropertyDefinitionTypeRepository, IPropertyDataFactory, IContentFactory, DefaultContentVersionRepository, CategoryDB, IBlobFactory, PropertyValueConverterFactory, DatabaseDateTimeHandler)
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
[Obsolete("Use alternative constructor")]
public ContentSaveDB(IDatabaseHandler databaseHandler, IContentTypeRepository contentTypeRepository, IPermanentLinkMapper permanentLinkMapper, ILanguageBranchRepository languageBranchRepository, IPropertyDefinitionRepository propertyDefinitionRepository, IPropertyDefinitionTypeRepository propertyDefinitionTypeRepsoitory, IPropertyDataFactory propertyDataFactory, IContentFactory contentFactory, DefaultContentVersionRepository contentVersionRepository, CategoryDB categoryDataAccess, IBlobFactory blobFactory, PropertyValueConverterFactory propertyValueConverterFactory, DatabaseDateTimeHandler dateTimeHandler)
Parameters
Type | Name | Description |
---|---|---|
IDatabaseHandler | databaseHandler | |
IContentTypeRepository | contentTypeRepository | |
IPermanentLinkMapper | permanentLinkMapper | |
ILanguageBranchRepository | languageBranchRepository | |
IPropertyDefinitionRepository | propertyDefinitionRepository | |
IPropertyDefinitionTypeRepository | propertyDefinitionTypeRepsoitory | |
IPropertyDataFactory | propertyDataFactory | |
IContentFactory | contentFactory | |
DefaultContentVersionRepository | contentVersionRepository | |
CategoryDB | categoryDataAccess | |
IBlobFactory | blobFactory | |
PropertyValueConverterFactory | propertyValueConverterFactory | |
DatabaseDateTimeHandler | dateTimeHandler |
ContentSaveDB(IDatabaseHandler, IContentTypeRepository, IPermanentLinkMapper, ILanguageBranchRepository, IPropertyDefinitionRepository, IPropertyDefinitionTypeRepository, IPropertyDataFactory, IContentFactory, DefaultContentVersionRepository, CategoryDB, IBlobFactory, PropertyValueConverterFactory, DatabaseDateTimeHandler, IContentVersionResolver)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
public ContentSaveDB(IDatabaseHandler databaseHandler, IContentTypeRepository contentTypeRepository, IPermanentLinkMapper permanentLinkMapper, ILanguageBranchRepository languageBranchRepository, IPropertyDefinitionRepository propertyDefinitionRepository, IPropertyDefinitionTypeRepository propertyDefinitionTypeRepsoitory, IPropertyDataFactory propertyDataFactory, IContentFactory contentFactory, DefaultContentVersionRepository contentVersionRepository, CategoryDB categoryDataAccess, IBlobFactory blobFactory, PropertyValueConverterFactory propertyValueConverterFactory, DatabaseDateTimeHandler dateTimeHandler, IContentVersionResolver contentVersionResolver)
Parameters
Type | Name | Description |
---|---|---|
IDatabaseHandler | databaseHandler | |
IContentTypeRepository | contentTypeRepository | |
IPermanentLinkMapper | permanentLinkMapper | |
ILanguageBranchRepository | languageBranchRepository | |
IPropertyDefinitionRepository | propertyDefinitionRepository | |
IPropertyDefinitionTypeRepository | propertyDefinitionTypeRepsoitory | |
IPropertyDataFactory | propertyDataFactory | |
IContentFactory | contentFactory | |
DefaultContentVersionRepository | contentVersionRepository | |
CategoryDB | categoryDataAccess | |
IBlobFactory | blobFactory | |
PropertyValueConverterFactory | propertyValueConverterFactory | |
DatabaseDateTimeHandler | dateTimeHandler | |
IContentVersionResolver | contentVersionResolver |
Fields
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. |
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 |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ReferenceInformation> |
IsNewVersionRequired(IContent, SaveAction)
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
public static bool IsNewVersionRequired(IContent content, SaveAction action)
Parameters
Type | Name | Description |
---|---|---|
IContent | content | |
SaveAction | action |
Returns
Type | Description |
---|---|
System.Boolean |
IsNewVersionRequired(IContent, SaveAction, Boolean)
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
public static bool IsNewVersionRequired(IContent content, SaveAction action, bool isModified)
Parameters
Type | Name | Description |
---|---|---|
IContent | content | |
SaveAction | action | |
System.Boolean | isModified |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
This method has been corrected to no longer return true for:
- Content without WorkID when SaveAction.ForceCurrentVersion flag is used
- When using SaveAction.Publish with SaveAction.ForceCurrentVersion
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 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