November Happy Hour will be moved to Thursday December 5th.

Class ContentDataBuilder

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Default implementation of IContentDataBuilder

Inheritance
System.Object
ContentDataBuilder
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()
Namespace: EPiServer.Construction.Internal
Assembly: EPiServer.dll
Version: 11.20.7
Syntax
[ServiceConfiguration(typeof(IContentDataBuilder))]
[ServiceConfiguration(typeof(IPropertyBlockBuilder), IncludeServiceAccessor = false)]
public class ContentDataBuilder : IContentDataBuilder, IPropertyBlockBuilder

Constructors

ContentDataBuilder(IPropertyDataFactory, IContentTypeRepository, IContentDataFactory<BlockData>, ILanguageBranchRepository, IPageDataMetadataBuilder, IContentLanguageAccessor, 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, IContentLanguageAccessor languageAccessor, IPrincipalAccessor principalAccessor)
Parameters
Type Name Description
IPropertyDataFactory propertyDataFactory
IContentTypeRepository contentTypeRepository
IContentDataFactory<BlockData> blockContentFactory
ILanguageBranchRepository languageBranchRepository
IPageDataMetadataBuilder pageDataMetadataBuilder
IContentLanguageAccessor languageAccessor
IPrincipalAccessor principalAccessor

Properties

LanguageBranchRepository

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets the language branch repository.

Declaration
protected virtual ILanguageBranchRepository LanguageBranchRepository { get; }
Property Value
Type Description
ILanguageBranchRepository

The language branch repository.

RequestTimeGetter

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. 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)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. 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)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. 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.

AddProperties(IPropertyBlock, BlockPropertyDefinitionType)

Declaration
public void AddProperties(IPropertyBlock blockProperty, BlockPropertyDefinitionType blockDefintionType)
Parameters
Type Name Description
IPropertyBlock blockProperty
BlockPropertyDefinitionType blockDefintionType

SetDefaultPropertyValues(IContentData, IContentData, ContentType)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. 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)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. 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)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. 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)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. 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)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. 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.

Implements

Extension Methods