Class ContentSaveDB
Handles all database modification of page data. This class supports the EPiServer infrastructure and is not intended to be used directly from your code.
Inherited Members
Namespace: EPiServer.DataAccess
Assembly: EPiServer.dll
Version: 7.19.2Syntax
public class ContentSaveDB : ContentDBConstructors
ContentSaveDB(IDatabaseHandler, IContentTypeRepository, IPermanentLinkMapper, ILanguageBranchRepository, IPropertyDefinitionRepository, IPropertyDefinitionTypeRepository, IPropertyDataFactory, ContentFactory, DefaultContentVersionRepository, CategoryDB, BlobFactory)
Initializes a new instance of the ContentSaveDB class.
Declaration
public ContentSaveDB(IDatabaseHandler databaseHandler, IContentTypeRepository contentTypeRepository, IPermanentLinkMapper permanentLinkMapper, ILanguageBranchRepository languageBranchRepository, IPropertyDefinitionRepository propertyDefinitionRepository, IPropertyDefinitionTypeRepository propertyDefinitionTypeRepsoitory, IPropertyDataFactory propertyDataFactory, ContentFactory contentFactory, DefaultContentVersionRepository contentVersionRepository, CategoryDB categoryDataAccess, BlobFactory blobFactory)Parameters
| Type | Name | Description | 
|---|---|---|
| IDatabaseHandler | databaseHandler | The database handler. | 
| IContentTypeRepository | contentTypeRepository | The content type repository. | 
| IPermanentLinkMapper | permanentLinkMapper | The permanent link mapper. | 
| ILanguageBranchRepository | languageBranchRepository | The language branch repository. | 
| IPropertyDefinitionRepository | propertyDefinitionRepository | The property definition repository. | 
| IPropertyDefinitionTypeRepository | propertyDefinitionTypeRepsoitory | The property definition type repsoitory. | 
| IPropertyDataFactory | propertyDataFactory | The property data factory. | 
| ContentFactory | contentFactory | The content factory. | 
| DefaultContentVersionRepository | contentVersionRepository | The content version repository. | 
| CategoryDB | categoryDataAccess | The category data access. | 
| BlobFactory | blobFactory | The blob factory. | 
Fields
SaveActionValues
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
public static SaveAction[] SaveActionValuesField Value
| Type | Description | 
|---|---|
| SaveAction[] | 
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.
This class supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
public static bool UsePageDataSaveTime { get; }Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
Methods
CreateAndSave(String)
Save the page data, creating page and/or versions as necessary. This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
[Obsolete("This method has been removed as it wasn't usable outside the current class.", true)]
protected void CreateAndSave(string currentUser)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | currentUser | Name of the user performing this operation | 
Delete(ContentReference, Boolean)
Delete content from database This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
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> | 
IsCheckInRequired(IContent, SaveAction)
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
public static bool IsCheckInRequired(IContent content, SaveAction action)Parameters
| Type | Name | Description | 
|---|---|---|
| IContent | content | |
| SaveAction | action | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | 
IsNewContentRequired(IContent)
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
public static bool IsNewContentRequired(IContent content)Parameters
| Type | Name | Description | 
|---|---|---|
| IContent | content | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | 
IsNewLanguageBranchRequired(PageData)
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
public static bool IsNewLanguageBranchRequired(PageData page)Parameters
| Type | Name | Description | 
|---|---|---|
| PageData | page | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | 
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 | 
IsNewVersionRequired(IContent, Boolean)
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
[Obsolete("The behavior of this method is a patch to work with Sparrowhawk 7.0 RTM")]
public static bool IsNewVersionRequired(IContent content, bool isModified)Parameters
| Type | Name | Description | 
|---|---|---|
| IContent | content | |
| System.Boolean | isModified | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | 
IsPublishRequired(IContent, SaveAction)
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
public static bool IsPublishRequired(IContent content, SaveAction action)Parameters
| Type | Name | Description | 
|---|---|---|
| IContent | content | |
| SaveAction | action | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | 
IsRejectRequired(IContentData, SaveAction)
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
public static bool IsRejectRequired(IContentData content, SaveAction action)Parameters
| Type | Name | Description | 
|---|---|---|
| IContentData | content | |
| SaveAction | action | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | 
IsSaveRequired(IContentData)
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
public static bool IsSaveRequired(IContentData content)Parameters
| Type | Name | Description | 
|---|---|---|
| IContentData | content | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | 
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
