Try our conversational search powered by Generative AI!

Class DefaultPropertyDefinitionRepository

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice.

Inheritance
System.Object
DefaultPropertyDefinitionRepository
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.DataAbstraction.Internal
Assembly: EPiServer.dll
Version: 11.20.7
Syntax
[ServiceConfiguration(typeof(IPropertyDefinitionRepository))]
public class DefaultPropertyDefinitionRepository : PropertyDefinitionRepository, IPropertyDefinitionRepository, ICachedRepository

Constructors

DefaultPropertyDefinitionRepository(ContentTypeModelRepository, ITabDefinitionRepository, ServiceAccessor<PropertyDefinitionDB>, ModelMerger, ISynchronizedObjectInstanceCache)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the DefaultPropertyDefinitionRepository class.

Declaration
public DefaultPropertyDefinitionRepository(ContentTypeModelRepository modelRepository, ITabDefinitionRepository tabDefinitionRepository, ServiceAccessor<PropertyDefinitionDB> pageDefinitionDataAccessor, ModelMerger modelMerger, ISynchronizedObjectInstanceCache cache)
Parameters
Type Name Description
ContentTypeModelRepository modelRepository

The model repository.

ITabDefinitionRepository tabDefinitionRepository

The tab definition repository.

ServiceAccessor<PropertyDefinitionDB> pageDefinitionDataAccessor

The page definition data accessor.

ModelMerger modelMerger

The model merger.

ISynchronizedObjectInstanceCache cache

The cache

Methods

CheckUsage(Int32, Boolean, Boolean, Boolean)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Retrieves information about the usage of the PropertyDefinition.

Declaration
public override bool CheckUsage(int propertyDefinitionID, bool onlyLanguageSpecific, bool onlyPublished, bool isDynamic)
Parameters
Type Name Description
System.Int32 propertyDefinitionID

The property definition ID.

System.Boolean onlyLanguageSpecific

if set to true only language specific usage is retrieved.

System.Boolean onlyPublished

if set to true only published versions will be checked.

System.Boolean isDynamic

if set to true only dynamic properties will be considered.

Returns
Type Description
System.Boolean

List of ContentUsage which contains information on what content uses the specified PropertyDefinition.

Overrides

ClearCache()

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Clears all the cached data from the repository.

Declaration
public void ClearCache()

ClearCache(PropertyDefinition)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Clears the cache manager for the specified property definition.

Declaration
public static void ClearCache(PropertyDefinition propertyDefinition)
Parameters
Type Name Description
PropertyDefinition propertyDefinition

The property definition which cache will be cleared.

Delete(PropertyDefinition)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Deletes a PropertyDefinition from the data repository.

Declaration
public override void Delete(PropertyDefinition propertyDefinition)
Parameters
Type Name Description
PropertyDefinition propertyDefinition

The PropertyDefinition to delete.

Overrides

ExistsPropertyDefinitionWithContentType(Guid)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Determines whether there is any property definition of the specified content type.

Declaration
public override bool ExistsPropertyDefinitionWithContentType(Guid contentTypeID)
Parameters
Type Name Description
System.Guid contentTypeID

The content type ID.

Returns
Type Description
System.Boolean

true if there is a property definition of the specified type; otherwise, false.

Overrides
Remarks

An example would be if there is a content type that has a property definition of a block with the specified id (contentTypeID)

GetUsage(Int32, Boolean, Boolean, Boolean)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Retrieves information about the usage of the PropertyDefinition.

Declaration
public override IEnumerable<ContentUsage> GetUsage(int propertyDefinitionID, bool onlyNoneMasterLanguage, bool onlyPublished, bool isDynamic)
Parameters
Type Name Description
System.Int32 propertyDefinitionID

The property definition ID.

System.Boolean onlyNoneMasterLanguage

if set to true only none master langauge are taken into account.

System.Boolean onlyPublished

if set to true only published versions will be checked.

System.Boolean isDynamic

if set to true only dynamic properties will be considered.

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

List of ContentUsage which contains information on what pages uses the specified PropertyDefinition.

Overrides

List(Int32)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Lists all PropertyDefinitions in the data repository for a specific content type id.

Declaration
public override IEnumerable<PropertyDefinition> List(int contentTypeID)
Parameters
Type Name Description
System.Int32 contentTypeID

The content type id.

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

Enumeration of PropertyDefinitions on specified content type.

Overrides

Load(Int32)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Load a definition based on its identifier.

Declaration
public override PropertyDefinition Load(int propertyDefinitionID)
Parameters
Type Name Description
System.Int32 propertyDefinitionID

The property definition identifier.

Returns
Type Description
PropertyDefinition

The definition if found or null.

Overrides

Save(PropertyDefinition, Boolean)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Saves the specified PropertyDefinition to the data repository.

Declaration
public override void Save(PropertyDefinition propertyDefinition, bool forceCacheClear)
Parameters
Type Name Description
PropertyDefinition propertyDefinition

The property definition to save.

System.Boolean forceCacheClear

Flag to determine if cache should be cleared regardless if anything is changed.

Overrides
Exceptions
Type Condition
System.NotSupportedException

propertyDefinition is marked as read only.

Implements

Extension Methods