Class DefaultContentProvider
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Handles Content which stored in EPiServer
Inherited Members
Namespace: EPiServer.Core.Internal
Assembly: EPiServer.dll
Version: 11.20.7Syntax
[ServiceConfiguration]
public class DefaultContentProvider : ContentProvider, IContentBatchResolver, IContentResolver, IBlobUriResolver
Constructors
DefaultContentProvider(DefaultContentProviderDatabase, DefaultContentVersionRepository, ServiceAccessor<IPropertyDefinitionRepository>, ServiceAccessor<IPageQuickSearch>, ServiceAccessor<ContentAclDB>, IPrincipalAccessor, ContentOptions)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the DefaultContentProvider class.
Declaration
public DefaultContentProvider(DefaultContentProviderDatabase contentProviderDatabase, DefaultContentVersionRepository contentVersionRepository, ServiceAccessor<IPropertyDefinitionRepository> propertyDefinitionRepository, ServiceAccessor<IPageQuickSearch> pageQuickSearcher, ServiceAccessor<ContentAclDB> contentAclDB, IPrincipalAccessor principalAccessor, ContentOptions contentOptions)
Parameters
Type | Name | Description |
---|---|---|
DefaultContentProviderDatabase | contentProviderDatabase | |
DefaultContentVersionRepository | contentVersionRepository | |
ServiceAccessor<IPropertyDefinitionRepository> | propertyDefinitionRepository | |
ServiceAccessor<IPageQuickSearch> | pageQuickSearcher | |
ServiceAccessor<ContentAclDB> | contentAclDB | |
IPrincipalAccessor | principalAccessor | |
ContentOptions | contentOptions |
Properties
ContentAclDB
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets the content acl DB.
Declaration
protected virtual ContentAclDB ContentAclDB { get; }
Property Value
Type | Description |
---|---|
ContentAclDB |
VersionRepository
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets the version repository.
Declaration
public override IContentVersionRepository VersionRepository { get; }
Property Value
Type | Description |
---|---|
IContentVersionRepository |
Overrides
Methods
Delete(ContentReference, Boolean)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Delete a content from storage..
Declaration
public override void Delete(ContentReference contentLink, bool forceDelete)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | contentLink | The content link. |
System.Boolean | forceDelete | if set to |
Overrides
DeleteChildren(ContentReference, Boolean)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Deletes the children.
Declaration
public override void DeleteChildren(ContentReference contentReference, bool forceDelete)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | contentReference | The content reference. |
System.Boolean | forceDelete | if set to |
Overrides
DeleteLanguageBranch(ContentReference, String)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Deletes a language branch for the content.
Declaration
public override void DeleteLanguageBranch(ContentReference contentLink, string languageBranch)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | contentLink | The content link. |
System.String | languageBranch | The language branch. |
Overrides
DeleteSecurityEntity(String, SecurityEntityType)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Deletes the specified user or role name.
Declaration
public override void DeleteSecurityEntity(string userOrRoleName, SecurityEntityType entityUserRole)
Parameters
Type | Name | Description |
---|---|---|
System.String | userOrRoleName | Name of the user or role. |
SecurityEntityType | entityUserRole | The entity user role. |
Overrides
GetDescendentReferences(ContentReference)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets all the descendents for the current page (that is at all levels). The base class implementation will do recursive calls to GetChildrenReferences.
Declaration
public override IList<ContentReference> GetDescendentReferences(ContentReference pageLink)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | pageLink | The page link. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<ContentReference> |
Overrides
GetPagesWithPropertyDefinition(PropertyDefinition, Boolean, Boolean)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets the pages with instance of page definition.
This method is for example called before a page definition defined in code is deleted.
Declaration
public override IList<ContentUsage> GetPagesWithPropertyDefinition(PropertyDefinition pageDefinition, bool onlyNoneMasterLanguage, bool onlyPublished)
Parameters
Type | Name | Description |
---|---|---|
PropertyDefinition | pageDefinition | The page definition. |
System.Boolean | onlyNoneMasterLanguage | if set to |
System.Boolean | onlyPublished | if set to |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<ContentUsage> |
Overrides
Remarks
The default implementation returns empty list.
GetReferencesToContentItems(IEnumerable<ContentReference>)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets all references to the specified content iotems. Override method to get all references to the given items.
Declaration
public override IList<ReferenceInformation> GetReferencesToContentItems(IEnumerable<ContentReference> contentLinks)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<ContentReference> | contentLinks | The content links to check references for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<ReferenceInformation> | A list of items that hold some kind of reference to the specified content. |
Overrides
GetReferencesToLocalContent(ContentReference, Boolean)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets all references to the specified content. Override method to get all references to the given items and optionally references to all decendents.
Declaration
public override IList<ReferenceInformation> GetReferencesToLocalContent(ContentReference contentLink, bool includeDecendents)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | contentLink | The content links. |
System.Boolean | includeDecendents | if set to |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<ReferenceInformation> | A list of items that hold some kind of reference to the specified content. |
Overrides
IsContentTypeUsed(ContentType)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Performs a check if specified ContentType is used.
This method is for example called before a content type defined in code is deleted.
Declaration
public override bool IsContentTypeUsed(ContentType contentType)
Parameters
Type | Name | Description |
---|---|---|
ContentType | contentType | The contentType to return references for. |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
Remarks
Default implementation calls ListContentOfContentType and checks if it returns Count > 0.
IsPropertyDefinitionUsed(PropertyDefinition)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Determines whether there is data store on specified propertyDefinition.
Declaration
public override bool IsPropertyDefinitionUsed(PropertyDefinition propertyDefinition)
Parameters
Type | Name | Description |
---|---|---|
PropertyDefinition | propertyDefinition | The property definition. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Overrides
Remarks
Default implementation calls GetPagesWithPropertyDefinition and checks if it returns Count > 0.
ListContentOfContentType(ContentType)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets a list of references to content of specified ContentType.
This method is for example called before a content type defined in code is deleted.
Declaration
public override IList<ContentUsage> ListContentOfContentType(ContentType contentType)
Parameters
Type | Name | Description |
---|---|---|
ContentType | contentType | The contentType to return references for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<ContentUsage> |
Overrides
ListDelayedPublish()
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Lists all content that are set to delayed publish.
Declaration
public override IEnumerable<IContent> ListDelayedPublish()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IContent> |
Overrides
ListMatchingSegments(ContentReference, String)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Lists references to all children content items that have matching routing/url segments.
Declaration
protected override IList<MatchingSegmentResult> ListMatchingSegments(ContentReference parentLink, string urlSegment)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | parentLink | The parent link. |
System.String | urlSegment | The URL segment. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<MatchingSegmentResult> |
Overrides
LoadChildrenReferencesAndTypes(ContentReference, String, out Boolean)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Loads the children references and its type.
Declaration
protected override IList<GetChildrenReferenceResult> LoadChildrenReferencesAndTypes(ContentReference contentLink, string languageID, out bool languageSpecific)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | contentLink | The content link. |
System.String | languageID | The language ID. |
System.Boolean | languageSpecific | True if the list if unique for this language, for example the sort order. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<GetChildrenReferenceResult> |
Overrides
LoadContent(ContentReference, ILanguageSelector)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Load content for given contentlink. Load content from repository
Declaration
protected override IContent LoadContent(ContentReference contentLink, ILanguageSelector languageSelector)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | contentLink | The content link. |
ILanguageSelector | languageSelector | The language selector. |
Returns
Type | Description |
---|---|
IContent |
Overrides
LoadContents(IList<ContentReference>, ILanguageSelector)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Batch loads contents
Declaration
protected override IEnumerable<IContent> LoadContents(IList<ContentReference> contentReferences, ILanguageSelector selector)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<ContentReference> | contentReferences | The content references. |
ILanguageSelector | selector | The selector. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IContent> |
Overrides
Remarks
Versions and published contents are splitted into two separate operations but are returned in the order as they were requested.
For references that specifies a specific version (that is where WorkID is set) the
selector
is ignored and the specific version is returned.
For references that is not for a specific version the content is returned in the language given by selector
or master language if it does not exist in specified language.
Move(ContentReference, ContentReference)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Moves the specified content reference.
Declaration
public override void Move(ContentReference contentReference, ContentReference destinationLink)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | contentReference | The content reference. |
ContentReference | destinationLink | The destination link. |
Overrides
MoveToWastebasket(ContentReference, String)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Moves to wastebasket.
Declaration
public override void MoveToWastebasket(ContentReference contentLink, string deletedBy)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | contentLink | The content link. |
System.String | deletedBy | The user who deleted the content. |
Overrides
ResolveContent(ContentReference)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Tries to resolve a Content from a ContentReference.
Declaration
protected override ContentResolveResult ResolveContent(ContentReference contentLink)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | contentLink | The content link. |
Returns
Type | Description |
---|---|
ContentResolveResult | A ContentResolveResult with the identifiers for the content or null if no content was matched. |
Overrides
ResolveContent(IEnumerable<ContentReference>)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Tries to resolve Contents from a list of ContentReference.
Declaration
protected override IEnumerable<ContentResolveResult> ResolveContent(IEnumerable<ContentReference> contentLinks)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<ContentReference> | contentLinks | The content links. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ContentResolveResult> | A list of matched ContentResolveResult. |
Overrides
ResolveContent(IEnumerable<Guid>)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Tries to resolve a Contents from a list of Guid identifiers.
Declaration
protected override IEnumerable<ContentResolveResult> ResolveContent(IEnumerable<Guid> contentGuids)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Guid> | contentGuids | The content GUIDs. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ContentResolveResult> | A list of matched ContentResolveResult. |
Overrides
ResolveContent(Guid)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Tries to resolve a Content from a Guid identifier.
Declaration
protected override ContentResolveResult ResolveContent(Guid contentGuid)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | contentGuid | The content GUID. |
Returns
Type | Description |
---|---|
ContentResolveResult | A ContentResolveResult with the identifiers for the content or null if no content was matched. |
Overrides
Save(IContent, SaveAction)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Save content to storage with specified action.
Declaration
public override ContentReference Save(IContent content, SaveAction action)
Parameters
Type | Name | Description |
---|---|---|
IContent | content | The content. |
SaveAction | action | The action. |
Returns
Type | Description |
---|---|
ContentReference |
Overrides
SaveSecurityDescriptor(ContentReference, IContentSecurityDescriptor, SecuritySaveType)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Saves the specified content security descriptor.
Declaration
public override void SaveSecurityDescriptor(ContentReference contentLink, IContentSecurityDescriptor contentSecurityDescriptor, SecuritySaveType securitySaveType)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | contentLink | The content link. |
IContentSecurityDescriptor | contentSecurityDescriptor | The content security descriptor. |
SecuritySaveType | securitySaveType | Type of the security save. |
Overrides
SetCacheSettings(ContentReference, IEnumerable<GetChildrenReferenceResult>, CacheSettings)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Sets the cache settings for children listing when it is added to cache. Override method to set e.g. control lifetime of content object in cache or to add additional cache dependency keys.
Declaration
protected override void SetCacheSettings(ContentReference contentReference, IEnumerable<GetChildrenReferenceResult> children, CacheSettings cacheSettings)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | contentReference | |
System.Collections.Generic.IEnumerable<GetChildrenReferenceResult> | children | |
CacheSettings | cacheSettings |
Overrides
Explicit Interface Implementations
IBlobUriResolver.ListVersionsForBlobUris(IEnumerable<Uri>)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice.
Declaration
IEnumerable<BlobUriReference> IBlobUriResolver.ListVersionsForBlobUris(IEnumerable<Uri> blobUris)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Uri> | blobUris |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<BlobUriReference> |