SaaS CMS has officially launched! Learn more now.

Class CatalogContentBuilder

This type/member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Represents the base class for catalog content builder.

Inheritance
System.Object
CatalogContentBuilder
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.Commerce.Catalog.Provider.Construction
Assembly: EPiServer.Business.Commerce.dll
Version: 11.8.3
Syntax
public abstract class CatalogContentBuilder : ICatalogContentBuilder

Constructors

CatalogContentBuilder(ICatalogSystem, MetaClassContentFactory, ICatalogPropertyLoader, ReferenceConverter, CatalogContentVersionDB)

Declaration
[Obsolete("Use constructor with UncachedCatalogSystemAccessor. Will remain at least until september 2018.")]
public CatalogContentBuilder(ICatalogSystem catalogContext, MetaClassContentFactory metaClassContentFactory, ICatalogPropertyLoader catalogPropertyLoader, ReferenceConverter referenceConverter, CatalogContentVersionDB contentVersionDB)
Parameters
Type Name Description
ICatalogSystem catalogContext
MetaClassContentFactory metaClassContentFactory
ICatalogPropertyLoader catalogPropertyLoader
ReferenceConverter referenceConverter
CatalogContentVersionDB contentVersionDB

CatalogContentBuilder(ReducedCacheCatalogSystemAccessor, MetaClassContentFactory, ICatalogPropertyLoader, ReferenceConverter, CatalogContentVersionDB)

Initializes a new instance of the CatalogContentBuilder class.

Declaration
public CatalogContentBuilder(ReducedCacheCatalogSystemAccessor catalogContextAccessor, MetaClassContentFactory metaClassContentFactory, ICatalogPropertyLoader catalogPropertyLoader, ReferenceConverter referenceConverter, CatalogContentVersionDB contentVersionDB)
Parameters
Type Name Description
ReducedCacheCatalogSystemAccessor catalogContextAccessor

The catalog context accessor.

MetaClassContentFactory metaClassContentFactory

The meta class content factory.

ICatalogPropertyLoader catalogPropertyLoader

The catalog property loader.

ReferenceConverter referenceConverter

The reference converter.

CatalogContentVersionDB contentVersionDB

The catalog content Database access.

Fields

AssetGroupName

Property containing the group name of the content asset.

Declaration
public const string AssetGroupName = "GroupName"
Field Value
Type Description
System.String

AssetKey

Property containing the asset key of the content asset.

Declaration
public const string AssetKey = "AssetKey"
Field Value
Type Description
System.String

AssetSortOrder

Property containing the sort order of the content asset.

Declaration
public const string AssetSortOrder = "SortOrder"
Field Value
Type Description
System.String

AssetType

Property containing the asset type of the content asset.

Declaration
public const string AssetType = "AssetType"
Field Value
Type Description
System.String

CatalogEntryId

Property containing the CatalogEntryId column of the CatalogItemAsset table.

Declaration
public const string CatalogEntryId = "CatalogEntryId"
Field Value
Type Description
System.String

CatalogId

Property containing the catalogId of the content.

Declaration
public const string CatalogId = "CatalogId"
Field Value
Type Description
System.String

CatalogNodeId

Property containing the CatalogNodeId column of the CatalogItemAsset table.

Declaration
public const string CatalogNodeId = "CatalogNodeId"
Field Value
Type Description
System.String

ClassTypeId

Property containing the class type of the content.

Declaration
public const string ClassTypeId = "ClassTypeId"
Field Value
Type Description
System.String

Code

Property containing the code of the content.

Declaration
public const string Code = "Code"
Field Value
Type Description
System.String

ContentApplicationId

Property containing the application Id of the content.

Declaration
[Obsolete("The concept of ApplicationID has been removed - don't use this constant. Will remain at least until August 2018.")]
public const string ContentApplicationId = "ApplicationId"
Field Value
Type Description
System.String

ContentGuid

Property containing the ContentGuid of the content.

Declaration
public const string ContentGuid = "ContentGuid"
Field Value
Type Description
System.String

Created

Property containing the Created column of the draft table.

Declaration
public const string Created = "Created"
Field Value
Type Description
System.String

CreatedBy

Property containing the user that created the draft table.

Declaration
public const string CreatedBy = "CreatedBy"
Field Value
Type Description
System.String

DefaultCurrency

Property containing the DefaultCurrency column of the Catalog table.

Declaration
public const string DefaultCurrency = "DefaultCurrency"
Field Value
Type Description
System.String

DefaultLanguage

Property containing the DefaultLanguage column of the Catalog table.

Declaration
public const string DefaultLanguage = "DefaultLanguage"
Field Value
Type Description
System.String

Height

Property containing the Height column of the variation table.

Declaration
public const string Height = "Height"
Field Value
Type Description
System.String

IsActive

Property containing the is active indicator of the content.

Declaration
public const string IsActive = "IsActive"
Field Value
Type Description
System.String

IsCommonDraft

Property containing the flag to indicate whether the draft content is common draft.

Declaration
public const string IsCommonDraft = "IsCommonDraft"
Field Value
Type Description
System.String

IsEncrypted

Property that marks whether the property is encrypted or not. It's used to be passed to the table data type udttCatalogContentProperty

Declaration
public const string IsEncrypted = "IsEncrypted"
Field Value
Type Description
System.String

IsNull

Property that marks whether the property is changed to null. It's used to be passed to the table data type udttCatalogContentProperty

Declaration
public const string IsNull = "IsNull"
Field Value
Type Description
System.String

IsPrimary

Property containing the IsPrimary column of the Catalog table.

Declaration
public const string IsPrimary = "IsPrimary"
Field Value
Type Description
System.String

IsPublished

Property containing the is published indicator of the content.

Declaration
public const string IsPublished = "IsPublished"
Field Value
Type Description
System.String

LanguageName

Property containing the language name of the content.

Declaration
public const string LanguageName = "LanguageName"
Field Value
Type Description
System.String

Languages

Property containing the list of enabled catalog language.

Declaration
public const string Languages = "Languages"
Field Value
Type Description
System.String

Length

Property containing the Length column of the variation table.

Declaration
public const string Length = "Length"
Field Value
Type Description
System.String

LengthBase

Property containing the LengthBase column of the Catalog table.

Declaration
public const string LengthBase = "LengthBase"
Field Value
Type Description
System.String

MasterLanguageName

Property containing the master language name of the content.

Declaration
public const string MasterLanguageName = "MasterLanguageName"
Field Value
Type Description
System.String

MasterVersionId

Property containing the master version Id of the content.

Declaration
public const string MasterVersionId = "MasterVersionId"
Field Value
Type Description
System.String

MaxQuantity

Property containing the MaxQuantity column of the variation table.

Declaration
public const string MaxQuantity = "MaxQuantity"
Field Value
Type Description
System.String

MetaClassId

Property containing the meta class Id of the content.

Declaration
public const string MetaClassId = "MetaClassId"
Field Value
Type Description
System.String

MetaFieldId

Property containing the meta field Id of the content.

Declaration
public const string MetaFieldId = "MetaFieldId"
Field Value
Type Description
System.String

MetaFieldName

Property containing the meta field name of the content.

Declaration
public const string MetaFieldName = "MetaFieldName"
Field Value
Type Description
System.String

MinQuantity

Property containing the MinQuantity column of the variation table.

Declaration
public const string MinQuantity = "MinQuantity"
Field Value
Type Description
System.String

Modified

Property containing the date that the draft is modified.

Declaration
public const string Modified = "Modified"
Field Value
Type Description
System.String

ModifiedBy

Property containing the user that modified the draft table.

Declaration
public const string ModifiedBy = "ModifiedBy"
Field Value
Type Description
System.String

Name

Property containing the name of the content.

Declaration
public const string Name = "Name"
Field Value
Type Description
System.String

ObjectId

Property containing the object id of the content.

Declaration
public const string ObjectId = "ObjectId"
Field Value
Type Description
System.String

ObjectTypeId

Property containing the Object Type Id of draft content.

Declaration
public const string ObjectTypeId = "ObjectTypeId"
Field Value
Type Description
System.String

Owner

Property containing the Owner column of the Catalog table.

Declaration
public const string Owner = "Owner"
Field Value
Type Description
System.String

PackageId

Property containing the PackageId column of the variation table.

Declaration
public const string PackageId = "PackageId"
Field Value
Type Description
System.String

ParentId

Property containing the parent Id of the content.

Declaration
public const string ParentId = "ParentId"
Field Value
Type Description
System.String

PropertyId

Property containing the property Id of the udttCatalogContentProperty.

Declaration
public const string PropertyId = "PropertyId"
Field Value
Type Description
System.String

PropertyTypeBinary

Property containing the Binary column of draft property table.

Declaration
public const string PropertyTypeBinary = "Binary"
Field Value
Type Description
System.String

PropertyTypeBoolean

Property containing the Boolean column of draft property table.

Declaration
public const string PropertyTypeBoolean = "Boolean"
Field Value
Type Description
System.String

PropertyTypeDate

Property containing the Date column of draft property table.

Declaration
public const string PropertyTypeDate = "Date"
Field Value
Type Description
System.String

PropertyTypeDecimal

Property containing the Decimal column of draft property table.

Declaration
public const string PropertyTypeDecimal = "Decimal"
Field Value
Type Description
System.String

PropertyTypeFloatNumber

Property containing the FloatNumber column of draft property table.

Declaration
public const string PropertyTypeFloatNumber = "FloatNumber"
Field Value
Type Description
System.String

PropertyTypeGuid

Property containing the Guid column of draft property table.

Declaration
public const string PropertyTypeGuid = "Guid"
Field Value
Type Description
System.String

PropertyTypeLongString

Property containing the LongString column of draft property table.

Declaration
public const string PropertyTypeLongString = "LongString"
Field Value
Type Description
System.String

PropertyTypeMoney

Property containing the Money column of draft property table.

Declaration
public const string PropertyTypeMoney = "Money"
Field Value
Type Description
System.String

PropertyTypeNumber

Property containing the Number column of draft property table.

Declaration
public const string PropertyTypeNumber = "Number"
Field Value
Type Description
System.String

PropertyTypeString

Property containing the String column of draft property table.

Declaration
public const string PropertyTypeString = "String"
Field Value
Type Description
System.String

SeoDescription

Property containing the SEO description the content.

Declaration
public const string SeoDescription = "SeoDescription"
Field Value
Type Description
System.String

SeoKeywords

Property containing the SEO keywords of the content.

Declaration
public const string SeoKeywords = "SeoKeywords"
Field Value
Type Description
System.String

SeoTitle

Property containing the SEO title of the content.

Declaration
public const string SeoTitle = "SeoTitle"
Field Value
Type Description
System.String

SeoUri

Property containing the Uri of the content.

Declaration
public const string SeoUri = "SeoUri"
Field Value
Type Description
System.String

SeoUriSegment

Property containing the Uri Segment of the content.

Declaration
public const string SeoUriSegment = "SeoUriSegment"
Field Value
Type Description
System.String

StartPublish

Property containing the start publish date of the content.

Declaration
public const string StartPublish = "StartPublish"
Field Value
Type Description
System.String

Status

Property containing the status of the content.

Declaration
public const string Status = "Status"
Field Value
Type Description
System.String

StopPublish

Property containing the stop publish date of the content.

Declaration
public const string StopPublish = "StopPublish"
Field Value
Type Description
System.String

TaxCategoryId

Property containing the tax category Id of the variation table.

Declaration
public const string TaxCategoryId = "TaxCategoryId"
Field Value
Type Description
System.String

TrackInventory

Property containing the TrackInventory column of the variation table.

Declaration
public const string TrackInventory = "TrackInventory"
Field Value
Type Description
System.String

UriSegment

Property containing the Uri Segment of the content catalog.

Declaration
public const string UriSegment = "UriSegment"
Field Value
Type Description
System.String

Weight

Property containing the Weight column of the variation table.

Declaration
public const string Weight = "Weight"
Field Value
Type Description
System.String

WeightBase

Property containing the WeightBase column of the Catalog table.

Declaration
public const string WeightBase = "WeightBase"
Field Value
Type Description
System.String

Width

Property containing the Width column of the variation table.

Declaration
public const string Width = "Width"
Field Value
Type Description
System.String

WorkId

Property containing the workId of the draft content.

Declaration
public const string WorkId = "WorkId"
Field Value
Type Description
System.String

Properties

CatalogContentVersionDB

Gets the catalog content version Database access.

Declaration
public CatalogContentVersionDB CatalogContentVersionDB { get; }
Property Value
Type Description
CatalogContentVersionDB

CatalogContext

Gets the catalog content.

Declaration
protected ICatalogSystem CatalogContext { get; }
Property Value
Type Description
ICatalogSystem

CatalogPropertyLoader

Gets the Catalog property loader.

Declaration
public ICatalogPropertyLoader CatalogPropertyLoader { get; }
Property Value
Type Description
ICatalogPropertyLoader

MetaClassContentFactory

Gets the Meta class content factory.

Declaration
public MetaClassContentFactory MetaClassContentFactory { get; }
Property Value
Type Description
MetaClassContentFactory

ReferenceConverter

Gets the reference converter.

Declaration
public ReferenceConverter ReferenceConverter { get; }
Property Value
Type Description
ReferenceConverter

Methods

Create(IList<ContentReference>, String)

Creates a list of CatalogContentBase according to each of the specified EPiServer.Core.ContentReference in contentLinks, regardless content version.

Declaration
public abstract IList<CatalogContentBase> Create(IList<ContentReference> contentLinks, string language)
Parameters
Type Name Description
System.Collections.Generic.IList<EPiServer.Core.ContentReference> contentLinks

The content links.

System.String language

The content language.

Returns
Type Description
System.Collections.Generic.IList<CatalogContentBase>

A list of CatalogContentBase.

CreateVersions(IList<ContentReference>)

Creates a list of CatalogContentBase version based on the list of content references

Declaration
public abstract IList<CatalogContentBase> CreateVersions(IList<ContentReference> contentLinks)
Parameters
Type Name Description
System.Collections.Generic.IList<EPiServer.Core.ContentReference> contentLinks

The content links.

Returns
Type Description
System.Collections.Generic.IList<CatalogContentBase>

A list of CatalogContentBase.

GetContentVersions(IEnumerable<Int32>, CatalogContentType)

Declaration
protected IDictionary<ContentReference, IList<ContentVersion>> GetContentVersions(IEnumerable<int> objectIds, CatalogContentType objectType)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.Int32> objectIds
CatalogContentType objectType
Returns
Type Description
System.Collections.Generic.IDictionary<EPiServer.Core.ContentReference, System.Collections.Generic.IList<EPiServer.DataAbstraction.ContentVersion>>

GetDBIntValue(Object)

Declaration
protected int? GetDBIntValue(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.Nullable<System.Int32>

GetLocalTime(Object)

Declaration
protected DateTime? GetLocalTime(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.Nullable<System.DateTime>

GetStatus(ContentReference, String, Boolean, IDictionary<ContentReference, IList<ContentVersion>>)

Declaration
protected VersionStatus GetStatus(ContentReference contentLink, string language, bool isPublished, IDictionary<ContentReference, IList<ContentVersion>> versions)
Parameters
Type Name Description
EPiServer.Core.ContentReference contentLink
System.String language
System.Boolean isPublished
System.Collections.Generic.IDictionary<EPiServer.Core.ContentReference, System.Collections.Generic.IList<EPiServer.DataAbstraction.ContentVersion>> versions
Returns
Type Description
EPiServer.Core.VersionStatus

HandleType(CatalogContentType)

Checks if this builder handles the specified catalogContentType.

Declaration
public abstract bool HandleType(CatalogContentType catalogContentType)
Parameters
Type Name Description
CatalogContentType catalogContentType

Type of the commerce content.

Returns
Type Description
System.Boolean

true if catalogContentType can be handled by this instance; otherwise false.

ReadAsset(DataTable, Dictionary<Int32, CatalogContentBase>)

Declaration
protected void ReadAsset(DataTable table, Dictionary<int, CatalogContentBase> contentMap)
Parameters
Type Name Description
System.Data.DataTable table
System.Collections.Generic.Dictionary<System.Int32, CatalogContentBase> contentMap

ReadProperties(DataTable, Dictionary<Int32, CatalogContentBase>)

Declaration
protected void ReadProperties(DataTable table, Dictionary<int, CatalogContentBase> contentMap)
Parameters
Type Name Description
System.Data.DataTable table
System.Collections.Generic.Dictionary<System.Int32, CatalogContentBase> contentMap

Implements