Interface IPropertyDefinitionRepository
Defines methods for interacting with a data repository where PropertyDefinitions are persisted.
Namespace: EPiServer.DataAbstraction
Assembly: EPiServer.dll
Version: 10.10.4Syntax
public interface IPropertyDefinitionRepository
Methods
CheckUsage(Int32, Boolean, Boolean, Boolean)
Retrieves information if the PropertyDefinition is used.
Declaration
bool CheckUsage(int propertyDefinitionID, bool onlyNoneMasterLanguage, bool onlyPublished, bool isDynamic)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | propertyDefinitionID | The page definition ID. |
System.Boolean | onlyNoneMasterLanguage | if set to |
System.Boolean | onlyPublished | if set to |
System.Boolean | isDynamic | if set to |
Returns
Type | Description |
---|---|
System.Boolean | true if there is data stored for definition otherwise false. |
Delete(PropertyDefinition)
Deletes a PropertyDefinition from the data repository.
Declaration
void Delete(PropertyDefinition propertyDefinition)
Parameters
Type | Name | Description |
---|---|---|
PropertyDefinition | propertyDefinition | The PropertyDefinition to delete. |
ExistsPropertyDefinitionWithContentType(Guid)
Determines whether there is any property definition of the specified content type.
Declaration
bool ExistsPropertyDefinitionWithContentType(Guid contentTypeID)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | contentTypeID | The content type ID. |
Returns
Type | Description |
---|---|
System.Boolean |
|
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 PropertyDefinition.
Declaration
IEnumerable<ContentUsage> GetUsage(int propertyDefinitionID, bool onlyNoneMasterLanguage, bool onlyPublished, bool isDynamic)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | propertyDefinitionID | The page definition ID. |
System.Boolean | onlyNoneMasterLanguage | if set to |
System.Boolean | onlyPublished | if set to |
System.Boolean | isDynamic | if set to |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ContentUsage> | List of ContentUsage which contains information on what pages uses the specified PropertyDefinition. |
List(Int32)
Lists all PropertyDefinitions in the data repository for a specific page type id.
Declaration
IEnumerable<PropertyDefinition> List(int pageTypeID)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | pageTypeID | The page type id. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<PropertyDefinition> | Enumeration of PropertyDefinitions on specified page type. |
ListDynamic()
Lists all PropertyDefinitions in the data repository that are dynamic properties.
Declaration
IEnumerable<PropertyDefinition> ListDynamic()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<PropertyDefinition> | A list of PropertyDefinitions that are dynamic properties. |
Load(Int32)
Loads a PropertyDefinition with the specified id from the data repository.
Declaration
PropertyDefinition Load(int propertyDefinitionID)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | propertyDefinitionID | The Id of the definition to load. |
Returns
Type | Description |
---|---|
PropertyDefinition | The PropertyDefinition that matches the given id or |
Save(PropertyDefinition)
Saves the specified PropertyDefinition to the data repository.
Declaration
void Save(PropertyDefinition propertyDefinition)
Parameters
Type | Name | Description |
---|---|---|
PropertyDefinition | propertyDefinition | The page definition to save. |