Class DefaultContentProviderDatabase
Abstraction for working with data access classes
Inheritance
Namespace: EPiServer.Core.Internal
Assembly: EPiServer.dll
Version: 12.0.3Syntax
[ServiceConfiguration]
public class DefaultContentProviderDatabase : Object
Constructors
DefaultContentProviderDatabase(ServiceAccessor<ContentListDB>, ServiceAccessor<ContentLoadDB>, ServiceAccessor<ContentSaveDB>, ServiceAccessor<ContentSoftLinkIndexer>, ServiceAccessor<IContentSoftLinkRepository>, ServiceAccessor<ContentSoftLinkDB>, BlobDB, IStatusTransitionEvaluator)
Declaration
public DefaultContentProviderDatabase(ServiceAccessor<ContentListDB> contentListDBAccessor, ServiceAccessor<ContentLoadDB> contentLoadDBAccessor, ServiceAccessor<ContentSaveDB> contentSaveDataAccess, ServiceAccessor<ContentSoftLinkIndexer> contentSoftLinkIndexer, ServiceAccessor<IContentSoftLinkRepository> contentSoftLinkRepo, ServiceAccessor<ContentSoftLinkDB> softLinkDBAccessor, BlobDB blobDB, IStatusTransitionEvaluator statusTransitionEvaluator)
Parameters
Type | Name | Description |
---|---|---|
Service |
contentListDBAccessor | |
Service |
contentLoadDBAccessor | |
Service |
contentSaveDataAccess | |
Service |
contentSoftLinkIndexer | |
Service |
contentSoftLinkRepo | |
Service |
softLinkDBAccessor | |
Blob |
blobDB | |
IStatus |
statusTransitionEvaluator |
Methods
CountDescendants(ContentReference)
Counts the descendants.
Declaration
public virtual int CountDescendants(ContentReference contentLink)
Parameters
Type | Name | Description |
---|---|---|
Content |
contentLink | The content link. |
Returns
Type | Description |
---|---|
System. |
Delete(ContentReference, Boolean)
Deletes the specified content link.
Declaration
public virtual void Delete(ContentReference contentLink, bool forceDelete)
Parameters
Type | Name | Description |
---|---|---|
Content |
contentLink | The content link. |
System. |
forceDelete | if set to |
DeleteChildren(ContentReference, Boolean)
Deletes the children.
Declaration
public virtual void DeleteChildren(ContentReference contentLink, bool forceDelete)
Parameters
Type | Name | Description |
---|---|---|
Content |
contentLink | The content link. |
System. |
forceDelete | if set to |
DeleteLanguage(ContentReference, String)
Deletes the language.
Declaration
public virtual void DeleteLanguage(ContentReference contentLink, string languageBranch)
Parameters
Type | Name | Description |
---|---|---|
Content |
contentLink | The content link. |
System. |
languageBranch | The language branch. |
GetReferenceInformationForContent(ContentReference, Boolean)
Gets the content of the reference information for.
Declaration
public virtual IEnumerable<ReferenceInformation> GetReferenceInformationForContent(ContentReference contentLink, bool includeDecendents)
Parameters
Type | Name | Description |
---|---|---|
Content |
contentLink | The content link. |
System. |
includeDecendents | if set to |
Returns
Type | Description |
---|---|
System. |
IsContentTypeUsed(ContentType, Boolean)
Checks if a content type is used.
Declaration
public virtual bool IsContentTypeUsed(ContentType contentType, bool onlyPublished)
Parameters
Type | Name | Description |
---|---|---|
Content |
contentType | Type of the content. |
System. |
onlyPublished | if set to |
Returns
Type | Description |
---|---|
System. |
ListAll()
Lists all.
Declaration
public virtual IList<ContentReference> ListAll()
Returns
Type | Description |
---|---|
System. |
ListAll(ContentReference)
Lists all.
Declaration
public virtual IList<ContentReference> ListAll(ContentReference contentLink)
Parameters
Type | Name | Description |
---|---|---|
Content |
contentLink | The content link. |
Returns
Type | Description |
---|---|
System. |
ListAll(ContentReference, String)
Lists all.
Declaration
public virtual IList<ContentReference> ListAll(ContentReference contentLink, string languageBranch)
Parameters
Type | Name | Description |
---|---|---|
Content |
contentLink | The content link. |
System. |
languageBranch | The language branch. |
Returns
Type | Description |
---|---|
System. |
ListContentOfContentType(ContentType, Boolean)
Lists the contents of the content type.
Declaration
public virtual IList<ContentUsage> ListContentOfContentType(ContentType contentType, bool onlyPublished)
Parameters
Type | Name | Description |
---|---|---|
Content |
contentType | Type of the content. |
System. |
onlyPublished | if set to |
Returns
Type | Description |
---|---|
System. |
ListMatchingSegments(ContentReference, String)
Lists references to all children content items that have matching routing/url segments.
Declaration
public virtual IList<MatchingSegmentResult> ListMatchingSegments(ContentReference parentLink, string urlSegment)
Parameters
Type | Name | Description |
---|---|---|
Content |
parentLink | The parent link. |
System. |
urlSegment | The URL segment. |
Returns
Type | Description |
---|---|
System. |
Load(ContentReference, Int32)
Loads the content.
Declaration
public virtual IContent Load(ContentReference contentLink, int languageBranchID)
Parameters
Type | Name | Description |
---|---|---|
Content |
contentLink | The content link. |
System. |
languageBranchID | The language branch ID. |
Returns
Type | Description |
---|---|
IContent |
LoadChildrenReferencesAndTypes(Int32, String, out FilterSortOrder)
load content references and content types
Declaration
public virtual IList<GetChildrenReferenceResult> LoadChildrenReferencesAndTypes(int contentID, string languageID, out FilterSortOrder parentSortOrder)
Parameters
Type | Name | Description |
---|---|---|
System. |
contentID | |
System. |
languageID | |
Filter |
parentSortOrder |
Returns
Type | Description |
---|---|
System. |
LoadLongString(Guid)
Loads the long string.
Declaration
public virtual string LoadLongString(Guid longStringGuid)
Parameters
Type | Name | Description |
---|---|---|
System. |
longStringGuid | The long string GUID. |
Returns
Type | Description |
---|---|
System. |
LoadSpecificContentInstances(IList<ContentReference>, Int32)
Loads the specific content instances.
Declaration
public virtual IList<IContent> LoadSpecificContentInstances(IList<ContentReference> contentLinks, int languageBranchID)
Parameters
Type | Name | Description |
---|---|---|
System. |
contentLinks | The content links. |
System. |
languageBranchID | The language branch ID. |
Returns
Type | Description |
---|---|
System. |
LoadSpecificContentVersions(IList<ContentReference>)
Batch loads specific versions of content.
Declaration
public virtual IList<IContent> LoadSpecificContentVersions(IList<ContentReference> contentLinks)
Parameters
Type | Name | Description |
---|---|---|
System. |
contentLinks | The versions to load. |
Returns
Type | Description |
---|---|
System. |
Remarks
Work
LoadVersion(ContentReference)
Loads the version.
Declaration
public virtual IContent LoadVersion(ContentReference contentLink)
Parameters
Type | Name | Description |
---|---|---|
Content |
contentLink | The content link. |
Returns
Type | Description |
---|---|
IContent |
LoadVersion(ContentReference, Int32)
Loads the version.
Declaration
public virtual IContent LoadVersion(ContentReference contentLink, int languageBranchID)
Parameters
Type | Name | Description |
---|---|---|
Content |
contentLink | The content link. |
System. |
languageBranchID | The language branch ID. |
Returns
Type | Description |
---|---|
IContent |
Move(ContentReference, ContentReference)
Moves the specified content link.
Declaration
public virtual void Move(ContentReference contentLink, ContentReference destinationLink)
Parameters
Type | Name | Description |
---|---|---|
Content |
contentLink | The content link. |
Content |
destinationLink | The destination link. |
Move(Int32, Int32, Boolean)
Moves the specified content link.
Declaration
public virtual void Move(int contentLink, int destinationLinkID, bool archive)
Parameters
Type | Name | Description |
---|---|---|
System. |
contentLink | The content link. |
System. |
destinationLinkID | The destination link ID. |
System. |
archive | if set to |
MoveToWastebasket(ContentReference, String)
Moves to wastebasket.
Declaration
public virtual void MoveToWastebasket(ContentReference contentLink, string deletedBy)
Parameters
Type | Name | Description |
---|---|---|
Content |
contentLink | The content link. |
System. |
deletedBy | The user who delete the content. |
Save(IContent, SaveAction, String)
Saves the specified content.
Declaration
public virtual ContentReference Save(IContent content, SaveAction action, string currentUser)
Parameters
Type | Name | Description |
---|---|---|
IContent | content | The content. |
Save |
action | The action. |
System. |
currentUser | The current user. |
Returns
Type | Description |
---|---|
Content |
Save(IContent, String)
Saves the specified content.
Declaration
public virtual void Save(IContent content, string currentUser)
Parameters
Type | Name | Description |
---|---|---|
IContent | content | The content. |
System. |
currentUser | The current user. |