Class DefaultPropertyDefinitionRepository
Inherited Members
Namespace: EPiServer.DataAbstraction.Internal
Assembly: EPiServer.dll
Version: 12.0.3Syntax
[ServiceConfiguration]
public class DefaultPropertyDefinitionRepository : PropertyDefinitionRepository, IPropertyDefinitionRepository, ICachedRepository
Constructors
DefaultPropertyDefinitionRepository(ContentTypeModelRepository, ITabDefinitionRepository, ServiceAccessor<PropertyDefinitionDB>, ModelMerger, ISynchronizedObjectInstanceCache)
Initializes a new instance of the Default
Declaration
public DefaultPropertyDefinitionRepository(ContentTypeModelRepository modelRepository, ITabDefinitionRepository tabDefinitionRepository, ServiceAccessor<PropertyDefinitionDB> pageDefinitionDataAccessor, ModelMerger modelMerger, ISynchronizedObjectInstanceCache cache)
Parameters
Type | Name | Description |
---|---|---|
Content |
modelRepository | The model repository. |
ITab |
tabDefinitionRepository | The tab definition repository. |
Service |
pageDefinitionDataAccessor | The page definition data accessor. |
Model |
modelMerger | The model merger. |
ISynchronized |
cache | The cache |
Methods
CheckUsage(Int32, Boolean, Boolean, Boolean)
Retrieves information about the usage of the Property
Declaration
public override bool CheckUsage(int propertyDefinitionID, bool onlyLanguageSpecific, bool onlyPublished, bool isDynamic)
Parameters
Type | Name | Description |
---|---|---|
System. |
propertyDefinitionID | The property definition ID. |
System. |
onlyLanguageSpecific | if set to |
System. |
onlyPublished | if set to |
System. |
isDynamic | if set to |
Returns
Type | Description |
---|---|
System. |
List of Content |
Overrides
ClearCache()
Clears all the cached data from the repository.
Declaration
public void ClearCache()
ClearCache(PropertyDefinition)
Clears the cache manager for the specified property definition.
Declaration
public static void ClearCache(PropertyDefinition propertyDefinition)
Parameters
Type | Name | Description |
---|---|---|
Property |
propertyDefinition | The property definition which cache will be cleared. |
Delete(PropertyDefinition)
Deletes a Property
Declaration
public override void Delete(PropertyDefinition propertyDefinition)
Parameters
Type | Name | Description |
---|---|---|
Property |
propertyDefinition | The Property |
Overrides
ExistsPropertyDefinitionWithContentType(Guid)
Determines whether there is any property definition of the specified content type.
Declaration
public override bool ExistsPropertyDefinitionWithContentType(Guid contentTypeID)
Parameters
Type | Name | Description |
---|---|---|
System. |
contentTypeID | The content type ID. |
Returns
Type | Description |
---|---|
System. |
|
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)
Retrieves information about the usage of the Property
Declaration
public override IEnumerable<ContentUsage> GetUsage(int propertyDefinitionID, bool onlyNoneMasterLanguage, bool onlyPublished, bool isDynamic)
Parameters
Type | Name | Description |
---|---|---|
System. |
propertyDefinitionID | The property definition ID. |
System. |
onlyNoneMasterLanguage | if set to |
System. |
onlyPublished | if set to |
System. |
isDynamic | if set to |
Returns
Type | Description |
---|---|
System. |
List of Content |
Overrides
List(Int32)
Lists all Property
Declaration
public override IEnumerable<PropertyDefinition> List(int contentTypeID)
Parameters
Type | Name | Description |
---|---|---|
System. |
contentTypeID | The content type id. |
Returns
Type | Description |
---|---|
System. |
Enumeration of Property |
Overrides
Load(Int32)
Load a definition based on its identifier.
Declaration
public override PropertyDefinition Load(int propertyDefinitionID)
Parameters
Type | Name | Description |
---|---|---|
System. |
propertyDefinitionID | The property definition identifier. |
Returns
Type | Description |
---|---|
Property |
The definition if found or |
Overrides
Save(PropertyDefinition, Boolean)
Saves the specified Property
Declaration
public override void Save(PropertyDefinition propertyDefinition, bool forceCacheClear)
Parameters
Type | Name | Description |
---|---|---|
Property |
propertyDefinition | The property definition to save. |
System. |
forceCacheClear | Flag to determine if cache should be cleared regardless if anything is changed. |
Overrides
Exceptions
Type | Condition |
---|---|
System. |
|