Class PropertyDefinitionDB
Database class for page definitions. This class supports the EPiServer infrastructure and is not intended to be used directly from your code.
Inheritance
Inherited Members
Namespace: EPiServer.DataAccess
Assembly: EPiServer.dll
Version: 8.11.0Syntax
[ServiceConfiguration]
public class PropertyDefinitionDB
Constructors
PropertyDefinitionDB(IDatabaseHandler, LocalizationService, ITabDefinitionRepository, IPropertyDefinitionTypeRepository, IPropertySettingsRepository, ISynchronizedObjectInstanceCache)
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
public PropertyDefinitionDB(IDatabaseHandler databaseHandler, LocalizationService localizationService, ITabDefinitionRepository tabDefinitionRepository, IPropertyDefinitionTypeRepository propertyDefinitionTypeRepository, IPropertySettingsRepository settingsRepository, ISynchronizedObjectInstanceCache cache)
Parameters
| Type | Name | Description |
|---|---|---|
| IDatabaseHandler | databaseHandler | |
| LocalizationService | localizationService | |
| ITabDefinitionRepository | tabDefinitionRepository | |
| IPropertyDefinitionTypeRepository | propertyDefinitionTypeRepository | |
| IPropertySettingsRepository | settingsRepository | |
| ISynchronizedObjectInstanceCache | cache |
Methods
CheckUsage(Int32, Boolean, Boolean, Boolean)
Retrieves information about if there is any data stored for PageDefinition.
Declaration
public virtual bool CheckUsage(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 |
| System.Boolean | onlyPublished | if set to |
| System.Boolean | isDynamic | if set to |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if there is data stored with for definition. |
ClearCache()
Declaration
public void ClearCache()
Delete(PropertyDefinition)
Deletes a PropertyDefinition from the data repository.
Declaration
public virtual 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
public bool ExistsPropertyDefinitionWithContentType(Guid contentTypeID)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Guid | contentTypeID | The content type ID. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
|
Remarks
This would be true for instance if there is a page 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 PageDefinition.
Declaration
public virtual 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 |
| 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 contents uses the specified PageDefinition. |
ListFromDb(Int32)
Declaration
public virtual IEnumerable<PropertyDefinition> ListFromDb(int contentTypeID)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | contentTypeID |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<PropertyDefinition> |
LoadFromDb(Int32)
Declaration
public virtual PropertyDefinition LoadFromDb(int propertyDefinitionID)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | propertyDefinitionID |
Returns
| Type | Description |
|---|---|
| PropertyDefinition |
OnRepositoryUpdated(PropertyDefinition, RepositoryEventType)
Called to raise the repository updated event
Declaration
protected static void OnRepositoryUpdated(PropertyDefinition propertyDefinition, RepositoryEventType eventType)
Parameters
| Type | Name | Description |
|---|---|---|
| PropertyDefinition | propertyDefinition | The property definition. |
| RepositoryEventType | eventType | Type of the event. |
Save(PropertyDefinition)
Saves the specified PropertyDefinition to the data repository.
Declaration
public virtual bool Save(PropertyDefinition propertyDefinition)
Parameters
| Type | Name | Description |
|---|---|---|
| PropertyDefinition | propertyDefinition | The property definition to save. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Events
RepositoryUpdated
Declaration
public static event EventHandler<RepositoryEventArgs> RepositoryUpdated
Event Type
| Type | Description |
|---|---|
| System.EventHandler<RepositoryEventArgs> |