Class PropertyDefinitionDB
Inheritance
Namespace: EPiServer.DataAccess.Internal
Assembly: EPiServer.dll
Version: 12.0.3Syntax
[ServiceConfiguration]
public class PropertyDefinitionDB : Object
Constructors
PropertyDefinitionDB(IDatabaseExecutor, LocalizationService, ITabDefinitionRepository, IPropertyDefinitionTypeRepository, IPropertySettingsRepository, ISynchronizedObjectInstanceCache, IPrincipalAccessor)
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
public PropertyDefinitionDB(IDatabaseExecutor databaseHandler, LocalizationService localizationService, ITabDefinitionRepository tabDefinitionRepository, IPropertyDefinitionTypeRepository propertyDefinitionTypeRepository, IPropertySettingsRepository settingsRepository, ISynchronizedObjectInstanceCache cache, IPrincipalAccessor principalAccessor)
Parameters
| Type | Name | Description |
|---|---|---|
| IDatabaseExecutor | databaseHandler | |
| LocalizationService | localizationService | |
| ITabDefinitionRepository | tabDefinitionRepository | |
| IPropertyDefinitionTypeRepository | propertyDefinitionTypeRepository | |
| IPropertySettingsRepository | settingsRepository | |
| ISynchronizedObjectInstanceCache | cache | |
| IPrincipalAccessor | principalAccessor |
Methods
CheckUsage(Int32, Boolean, Boolean, Boolean)
Retrieves information about if there is any data stored for PropertyDefinition.
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 PropertyDefinition.
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 PropertyDefinition. |
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> |