Class ContentDB
Base class for reading PageData information from SQL Server
This class supports the EPiServer infrastructure and is not intended to be used directly from your code.
Inheritance
System.Object
ContentDB
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: EPiServer.dll
Version: 8.11.0
Syntax
public abstract class ContentDB : DataAccessBase
Constructors
ContentDB(IDatabaseHandler, IPermanentLinkMapper, ILanguageBranchRepository, IPropertyDataFactory, IContentTypeRepository, IPropertyDefinitionRepository, IPropertyDefinitionTypeRepository, ContentFactory, BlobFactory)
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
[Obsolete("Use alternative constructor")]
protected ContentDB(IDatabaseHandler databaseHandler, IPermanentLinkMapper permanentLinkMapper, ILanguageBranchRepository languageBranchRepository, IPropertyDataFactory propertyDataFactory, IContentTypeRepository contentTypeRepository, IPropertyDefinitionRepository propertyDefinitionRepository, IPropertyDefinitionTypeRepository propertyDefinitionTypeRepository, ContentFactory contentFactory, BlobFactory blobFactory)
Parameters
ContentDB(IDatabaseHandler, IPermanentLinkMapper, ILanguageBranchRepository, IPropertyDataFactory, IContentTypeRepository, IPropertyDefinitionRepository, IPropertyDefinitionTypeRepository, ContentFactory, BlobFactory, PropertyValueConverterFactory)
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
protected ContentDB(IDatabaseHandler databaseHandler, IPermanentLinkMapper permanentLinkMapper, ILanguageBranchRepository languageBranchRepository, IPropertyDataFactory propertyDataFactory, IContentTypeRepository contentTypeRepository, IPropertyDefinitionRepository propertyDefinitionRepository, IPropertyDefinitionTypeRepository propertyDefinitionTypeRepository, ContentFactory contentFactory, BlobFactory blobFactory, PropertyValueConverterFactory propertyValueConverterFactory)
Parameters
Fields
DataTypeToDBName
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
public static readonly string[] DataTypeToDBName
Field Value
Type |
Description |
System.String[] |
|
PropertyNameKey
Declaration
protected const string PropertyNameKey = "PropertyName"
Field Value
Type |
Description |
System.String |
|
ScopeNameKey
Declaration
protected const string ScopeNameKey = "ScopeName"
Field Value
Type |
Description |
System.String |
|
Properties
ContentTypeRepository
Gets or sets the content type repository.
Declaration
protected IContentTypeRepository ContentTypeRepository { get; set; }
Property Value
LanguageBranchRepository
Gets or sets the language branch repository.
Declaration
protected ILanguageBranchRepository LanguageBranchRepository { get; set; }
Property Value
PermanentLinkMapper
Gets the permanent link mapper.
Declaration
protected IPermanentLinkMapper PermanentLinkMapper { get; }
Property Value
PropertyDataFactory
Gets or sets the language branch repository.
Declaration
protected IPropertyDataFactory PropertyDataFactory { get; set; }
Property Value
PropertyDefinitionRepository
Gets or sets the property definition repository.
Declaration
protected IPropertyDefinitionRepository PropertyDefinitionRepository { get; set; }
Property Value
PropertyDefinitionTypeRepository
Gets or sets the property definition repository.
Declaration
protected IPropertyDefinitionTypeRepository PropertyDefinitionTypeRepository { get; set; }
Property Value
Methods
AssignBinaryStorable(IBinaryStorable, DbDataReader)
Declaration
protected void AssignBinaryStorable(IBinaryStorable binaryStorable, DbDataReader reader)
Parameters
Type |
Name |
Description |
IBinaryStorable |
binaryStorable |
|
System.Data.Common.DbDataReader |
reader |
|
AssignChangeTracking(IChangeTrackable, DbDataReader)
Declaration
protected void AssignChangeTracking(IChangeTrackable changeTracking, DbDataReader reader)
Parameters
Type |
Name |
Description |
IChangeTrackable |
changeTracking |
|
System.Data.Common.DbDataReader |
reader |
|
AssignContentLanguage(ILocale, DbDataReader)
Declaration
protected void AssignContentLanguage(ILocale languageData, DbDataReader reader)
Parameters
Type |
Name |
Description |
ILocale |
languageData |
|
System.Data.Common.DbDataReader |
reader |
|
AssignContentMedia(IContentMedia, DbDataReader)
Declaration
protected void AssignContentMedia(IContentMedia contentMedia, DbDataReader reader)
Parameters
Type |
Name |
Description |
IContentMedia |
contentMedia |
|
System.Data.Common.DbDataReader |
reader |
|
AssignContentResource(IContentAsset, DbDataReader)
Declaration
protected void AssignContentResource(IContentAsset contentResources, DbDataReader reader)
Parameters
Type |
Name |
Description |
IContentAsset |
contentResources |
|
System.Data.Common.DbDataReader |
reader |
|
AssignDeleteInfo(IContent, DbDataReader)
Declaration
protected void AssignDeleteInfo(IContent content, DbDataReader reader)
Parameters
Type |
Name |
Description |
IContent |
content |
|
System.Data.Common.DbDataReader |
reader |
|
AssignExistingLanguages(ILocalizable, IEnumerable<CultureInfo>)
Declaration
protected void AssignExistingLanguages(ILocalizable languageData, IEnumerable<CultureInfo> languages)
Parameters
Type |
Name |
Description |
ILocalizable |
languageData |
|
System.Collections.Generic.IEnumerable<System.Globalization.CultureInfo> |
languages |
|
AssignLegacyResourceable(ILegacyResourceable, DbDataReader)
Declaration
protected void AssignLegacyResourceable(ILegacyResourceable contentResources, DbDataReader reader)
Parameters
Type |
Name |
Description |
ILegacyResourceable |
contentResources |
|
System.Data.Common.DbDataReader |
reader |
|
AssignMasterLanguage(ILocalizable, DbDataReader)
Declaration
protected void AssignMasterLanguage(ILocalizable languageData, DbDataReader reader)
Parameters
Type |
Name |
Description |
ILocalizable |
languageData |
|
System.Data.Common.DbDataReader |
reader |
|
AssignResourceable(IResourceable, DbDataReader)
Declaration
protected void AssignResourceable(IResourceable contentResources, DbDataReader reader)
Parameters
Type |
Name |
Description |
IResourceable |
contentResources |
|
System.Data.Common.DbDataReader |
reader |
|
AssignRoutingSegment(IRoutable, DbDataReader)
Declaration
protected void AssignRoutingSegment(IRoutable routingSegment, DbDataReader reader)
Parameters
Type |
Name |
Description |
IRoutable |
routingSegment |
|
System.Data.Common.DbDataReader |
reader |
|
AssignValueIfNotNull(Object, Action<Object>)
Declaration
protected void AssignValueIfNotNull(object dbValue, Action<object> action)
Parameters
Type |
Name |
Description |
System.Object |
dbValue |
|
System.Action<System.Object> |
action |
|
AssignVersionStatus(IVersionable, DbDataReader)
Declaration
protected void AssignVersionStatus(IVersionable versionStatus, DbDataReader reader)
Parameters
Type |
Name |
Description |
IVersionable |
versionStatus |
|
System.Data.Common.DbDataReader |
reader |
|
CreateContent(ContentType)
Declaration
protected IContent CreateContent(ContentType contentType)
Parameters
Returns
FinalizeContent(IContent)
Declaration
protected void FinalizeContent(IContent content)
Parameters
GetBlockProperty(String[], ref PropertyDataCollection, Boolean, Boolean, ContentReference)
Declaration
protected PropertyData GetBlockProperty(string[] parts, ref PropertyDataCollection scopeCollection, bool logWarnings, bool createMissingDynamicBlocks, ContentReference contentLink)
Parameters
Returns
GetDynamicScopeName(Int32, String)
Declaration
protected string GetDynamicScopeName(int blockPropertyTypeId, string propName)
Parameters
Type |
Name |
Description |
System.Int32 |
blockPropertyTypeId |
|
System.String |
propName |
|
Returns
Type |
Description |
System.String |
|
GetProperty(PropertyDataCollection, DbDataReader, ContentReference)
Declaration
protected PropertyData GetProperty(PropertyDataCollection properties, DbDataReader reader, ContentReference contentLink)
Parameters
Returns
IsIdentityData(String)
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
public static bool IsIdentityData(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
Type |
Description |
System.Boolean |
|
IsIgnoreOnImportData(String)
Checks if a property should be ignored when setting property values during an import.
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
public static bool IsIgnoreOnImportData(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
The name of the property.
|
Returns
Type |
Description |
System.Boolean |
true if the property should be ignored; otherwise false.
|
IsMetaData(String)
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
public static bool IsMetaData(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
Type |
Description |
System.Boolean |
|
LoadACL(DbDataReader, IContentSecurityDescriptor)
Declaration
protected virtual void LoadACL(DbDataReader reader, IContentSecurityDescriptor contentSecurityDescriptor)
Parameters
LoadACLReferences(IContentSecurityDescriptor, DbDataReader)
Declaration
protected virtual void LoadACLReferences(IContentSecurityDescriptor contentSecurityDescriptor, DbDataReader reader)
Parameters
LoadIdentity(IContent, DbDataReader, Boolean)
Declaration
protected void LoadIdentity(IContent content, DbDataReader reader, bool assignContentLink)
Parameters
Type |
Name |
Description |
IContent |
content |
|
System.Data.Common.DbDataReader |
reader |
|
System.Boolean |
assignContentLink |
|
LoadSingleCategory(DbDataReader, CategoryList)
Declaration
protected void LoadSingleCategory(DbDataReader reader, CategoryList categoryList)
Parameters
Type |
Name |
Description |
System.Data.Common.DbDataReader |
reader |
|
CategoryList |
categoryList |
|
OnBeforeSavingProperty(PropertyEventArgs)
Raises the BeforeSavingProperty event before a property is saved.
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
[Obsolete("This event will be removed in a future version")]
public void OnBeforeSavingProperty(PropertyEventArgs e)
Parameters
PageGuidOrNull(PropertyData)
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
protected object PageGuidOrNull(PropertyData prop)
Parameters
Returns
Type |
Description |
System.Object |
|
PopulatePropertyCommand(DbCommand, ContentReference, Guid, PropertyDataCollection, PropertyData, String)
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
protected bool PopulatePropertyCommand(DbCommand cmd, ContentReference currentPage, Guid currentPageGuid, PropertyDataCollection props, PropertyData prop, string scopeName)
Parameters
Returns
Type |
Description |
System.Boolean |
|
PopulatePropertyCommand(DbCommand, PageReference, PropertyDataCollection, PropertyData)
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
protected bool PopulatePropertyCommand(DbCommand cmd, PageReference currentPage, PropertyDataCollection props, PropertyData prop)
Parameters
Returns
Type |
Description |
System.Boolean |
|
ReadPropertyData(PropertyData, DbDataReader, ContentReference, CultureInfo)
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
protected void ReadPropertyData(PropertyData prop, DbDataReader reader, ContentReference contentLink, CultureInfo language)
Parameters
Type |
Name |
Description |
PropertyData |
prop |
|
System.Data.Common.DbDataReader |
reader |
|
ContentReference |
contentLink |
|
System.Globalization.CultureInfo |
language |
|
ThrowIfNotRequiredType(IContent, Type)
Declaration
protected static void ThrowIfNotRequiredType(IContent content, Type requiredType)
Parameters
Type |
Name |
Description |
IContent |
content |
|
System.Type |
requiredType |
|
ThrowIfNotValidDateTime(DateTime)
Declaration
protected void ThrowIfNotValidDateTime(DateTime date)
Parameters
Type |
Name |
Description |
System.DateTime |
date |
|
ThrowNotFoundException(ContentReference)
Declaration
protected void ThrowNotFoundException(ContentReference contentLink)
Parameters
TryToGuid(Object, out Guid)
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
protected bool TryToGuid(object data, out Guid result)
Parameters
Type |
Name |
Description |
System.Object |
data |
|
System.Guid |
result |
|
Returns
Type |
Description |
System.Boolean |
|
Events
BeforeSavingProperty
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
[Obsolete("This event will be removed in a future version")]
public static event EventHandler<PropertyEventArgs> BeforeSavingProperty
Event Type
Extension Methods