Class ContentDataBuilder
Default implementation of IContentDataBuilder
Implements
Inherited Members
Namespace: EPiServer.Construction
Assembly: EPiServer.dll
Version: 9.12.2Syntax
[ServiceConfiguration(typeof(IContentDataBuilder))]
public class ContentDataBuilder : IContentDataBuilder
Constructors
ContentDataBuilder(IPropertyDataFactory, BlockTypeRepository, IContentDataFactory<BlockData>, ILanguageBranchRepository)
Initializes a new instance of the ContentDataBuilder class.
Declaration
[Obsolete("Use alternative constructor")]
public ContentDataBuilder(IPropertyDataFactory propertyDataFactory, BlockTypeRepository blockTypeRepository, IContentDataFactory<BlockData> blockContentFactory, ILanguageBranchRepository languageBranchRepository)
Parameters
Type | Name | Description |
---|---|---|
IPropertyDataFactory | propertyDataFactory | The property data factory. |
BlockTypeRepository | blockTypeRepository | The block type repository. |
IContentDataFactory<BlockData> | blockContentFactory | The block content factory. |
ILanguageBranchRepository | languageBranchRepository | The language branch repository. |
ContentDataBuilder(IPropertyDataFactory, BlockTypeRepository, IContentDataFactory<BlockData>, ILanguageBranchRepository, IPageDataMetadataBuilder, LanguageResolver, IPrincipalAccessor)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the ContentDataBuilder class.
Declaration
[Obsolete("Use alternative constructor")]
public ContentDataBuilder(IPropertyDataFactory propertyDataFactory, BlockTypeRepository blockTypeRepository, IContentDataFactory<BlockData> blockContentFactory, ILanguageBranchRepository languageBranchRepository, IPageDataMetadataBuilder pageDataMetadataBuilder, LanguageResolver languageResolver, IPrincipalAccessor principalAccessor)
Parameters
Type | Name | Description |
---|---|---|
IPropertyDataFactory | propertyDataFactory | |
BlockTypeRepository | blockTypeRepository | |
IContentDataFactory<BlockData> | blockContentFactory | |
ILanguageBranchRepository | languageBranchRepository | |
IPageDataMetadataBuilder | pageDataMetadataBuilder | |
LanguageResolver | languageResolver | |
IPrincipalAccessor | principalAccessor |
ContentDataBuilder(IPropertyDataFactory, IContentTypeRepository, IContentDataFactory<BlockData>, ILanguageBranchRepository, IPageDataMetadataBuilder, LanguageResolver, IPrincipalAccessor)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the ContentDataBuilder class.
Declaration
public ContentDataBuilder(IPropertyDataFactory propertyDataFactory, IContentTypeRepository contentTypeRepository, IContentDataFactory<BlockData> blockContentFactory, ILanguageBranchRepository languageBranchRepository, IPageDataMetadataBuilder pageDataMetadataBuilder, LanguageResolver languageResolver, IPrincipalAccessor principalAccessor)
Parameters
Type | Name | Description |
---|---|---|
IPropertyDataFactory | propertyDataFactory | |
IContentTypeRepository | contentTypeRepository | |
IContentDataFactory<BlockData> | blockContentFactory | |
ILanguageBranchRepository | languageBranchRepository | |
IPageDataMetadataBuilder | pageDataMetadataBuilder | |
LanguageResolver | languageResolver | |
IPrincipalAccessor | principalAccessor |
Properties
LanguageBranchRepository
Gets the language branch repository.
Declaration
protected virtual ILanguageBranchRepository LanguageBranchRepository { get; }
Property Value
Type | Description |
---|---|
ILanguageBranchRepository | The language branch repository. |
RequestTimeGetter
Delegate to get current time for request, default implementation is Context.Current.RequestTime.
Declaration
public Func<DateTime> RequestTimeGetter { get; set; }
Property Value
Type | Description |
---|---|
System.Func<System.DateTime> | The request time getter. |
Remarks
This is exposed mainly for testing purposes to avoid having to set up BaseLibrary in tests.
Methods
AddContentTypeProperties(IContentData, ContentType)
Adds the content type properties.
Declaration
protected void AddContentTypeProperties(IContentData contentData, ContentType contentType)
Parameters
Type | Name | Description |
---|---|---|
IContentData | contentData | The content data. |
ContentType | contentType | Type of the content. |
AddProperties(IContentData, BuildingContext)
Adds properties to the contentData
according to the buildingContext
Declaration
public virtual void AddProperties(IContentData contentData, BuildingContext buildingContext)
Parameters
Type | Name | Description |
---|---|---|
IContentData | contentData | The contentData to populate with properties. |
BuildingContext | buildingContext | The building context. |
SetDefaultPropertyValues(IContentData, IContentData, ContentType)
Sets the default property values.
Declaration
protected virtual void SetDefaultPropertyValues(IContentData child, IContentData parent, ContentType type)
Parameters
Type | Name | Description |
---|---|---|
IContentData | child | The child. |
IContentData | parent | The parent. |
ContentType | type | The type. |
SetIdentity(IContent, BuildingContext)
Sets the identity of the IContent instance
Declaration
protected void SetIdentity(IContent content, BuildingContext buildingContext)
Parameters
Type | Name | Description |
---|---|---|
IContent | content | The content. |
BuildingContext | buildingContext | The building context. |
SetInheritedData(IContent, IContent, ContentType)
Sets any system defined default values inherited from their parents.
Declaration
protected virtual void SetInheritedData(IContent content, IContent parentData, ContentType contentType)
Parameters
Type | Name | Description |
---|---|---|
IContent | content | The content. |
IContent | parentData | The parent page data. |
ContentType | contentType | Type of the content. |
SetLanguageProperties(IContent, ILanguageSelector)
Sets the language properties for the page according to the passed in languageSelector
Declaration
protected virtual void SetLanguageProperties(IContent content, ILanguageSelector languageSelector)
Parameters
Type | Name | Description |
---|---|---|
IContent | content | The content. |
ILanguageSelector | languageSelector | The language selector. |
ValidateParameters(IContentData, BuildingContext)
Validates the parameters.
Declaration
protected void ValidateParameters(IContentData contentData, BuildingContext buildingContext)
Parameters
Type | Name | Description |
---|---|---|
IContentData | contentData | The content data. |
BuildingContext | buildingContext | The building context. |