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

Class DefaultContentVersionRepository

Inheritance
System.Object
DefaultContentVersionRepository
Namespace: EPiServer.DataAbstraction.Internal
Assembly: EPiServer.dll
Version: 12.0.3
Syntax
[ServiceConfiguration]
public class DefaultContentVersionRepository : Object, IContentVersionRepository, IContentVersionRepositoryEx

Constructors

DefaultContentVersionRepository(ServiceAccessor<ContentVersionDB>, ISynchronizedObjectInstanceCache, IContentCacheKeyCreator, ContentOptions)

Declaration
public DefaultContentVersionRepository(ServiceAccessor<ContentVersionDB> versionDD, ISynchronizedObjectInstanceCache cache, IContentCacheKeyCreator cacheKeyCreator, ContentOptions contentOptions)
Parameters
Type Name Description
ServiceAccessor<ContentVersionDB> versionDD
ISynchronizedObjectInstanceCache cache
IContentCacheKeyCreator cacheKeyCreator
ContentOptions contentOptions

Fields

CachedContentVersionKey

Declaration
public const string CachedContentVersionKey = "EP:ContentVersion:"
Field Value
Type Description
System.String

Methods

ClearCache(ContentReference)

Declaration
public void ClearCache(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

Delete(ContentReference)

Delete a single version of a Content

Declaration
public virtual void Delete(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The content link.

DeleteVersionByDataAccess(ContentReference)

Deletes the version from Respository.

Declaration
protected virtual void DeleteVersionByDataAccess(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The content link.

Initialize(IContentEvents)

Declaration
public void Initialize(IContentEvents contentEvents)
Parameters
Type Name Description
IContentEvents contentEvents

List(VersionFilter, Int32, Int32, out Int32)

Lists all versions that matches the filter

Declaration
public IEnumerable<ContentVersion> List(VersionFilter filter, int startIndex, int maxRows, out int totalCount)
Parameters
Type Name Description
VersionFilter filter

The filter used

System.Int32 startIndex

The start index, used for paging

System.Int32 maxRows

The maximum number of rows returned

System.Int32 totalCount

The total amount of matched versions

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

A list of versions, if no versions where matched an empty list will be returned

ListObsolete(Int32, out Int32)

Declaration
public IEnumerable<ContentVersion> ListObsolete(int maxRows, out int totalCount)
Parameters
Type Name Description
System.Int32 maxRows
System.Int32 totalCount
Returns
Type Description
System.Collections.Generic.IEnumerable<ContentVersion>

Load(ContentReference)

Loads the version.

Declaration
public virtual ContentVersion Load(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The content link.

Returns
Type Description
ContentVersion

A ContentVersion

LoadCommonDraft(ContentReference, String)

Loads the common draft.

Declaration
public virtual ContentVersion LoadCommonDraft(ContentReference contentLink, string language)
Parameters
Type Name Description
ContentReference contentLink

The content link to load common draft for.

System.String language

The language.

Returns
Type Description
ContentVersion

CommonDraft if it exist, otherwise Published, If no published exist the latest saved version is returned

LoadPublished(ContentReference)

Loads the published version

Declaration
public virtual ContentVersion LoadPublished(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The content link.

Returns
Type Description
ContentVersion

A ContentVersion

LoadPublished(ContentReference, String)

Loads the published version a page with current language selection if the languageBranch is null otherwise loads the published version a page for a specific language

Declaration
public virtual ContentVersion LoadPublished(ContentReference contentLink, string languageBranch)
Parameters
Type Name Description
ContentReference contentLink

The content link.

System.String languageBranch

The language branch.

Returns
Type Description
ContentVersion

A ContentVersion

SetCommonDraft(ContentReference)

Sets the specified version as common draft.

Declaration
public void SetCommonDraft(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The content link.

Implements

Extension Methods