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: 7.19.2Syntax
public class PropertyDefinitionDB
Constructors
PropertyDefinitionDB(IDatabaseHandler, LocalizationService, ITabDefinitionRepository, IPropertyDefinitionTypeRepository)
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
[Obsolete("Constructor replaced with an overload that takes IPropertySettingsRepository")]
public PropertyDefinitionDB(IDatabaseHandler databaseHandler, LocalizationService localizationService, ITabDefinitionRepository tabDefinitionRepository, IPropertyDefinitionTypeRepository propertyDefinitionTypeRepository)
Parameters
| Type | Name | Description |
|---|---|---|
| IDatabaseHandler | databaseHandler | |
| LocalizationService | localizationService | |
| ITabDefinitionRepository | tabDefinitionRepository | |
| IPropertyDefinitionTypeRepository | propertyDefinitionTypeRepository |
PropertyDefinitionDB(IDatabaseHandler, LocalizationService, ITabDefinitionRepository, IPropertyDefinitionTypeRepository, IPropertySettingsRepository)
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)
Parameters
| Type | Name | Description |
|---|---|---|
| IDatabaseHandler | databaseHandler | |
| LocalizationService | localizationService | |
| ITabDefinitionRepository | tabDefinitionRepository | |
| IPropertyDefinitionTypeRepository | propertyDefinitionTypeRepository | |
| IPropertySettingsRepository | settingsRepository |
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. |
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 pageTypeID)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | pageTypeID |
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> |