Class CatalogContentLoader

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

Fetches commerce catalog data as content instances.

Inheritance
System.Object
CatalogContentLoader
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
Assembly: EPiServer.Business.Commerce.dll
Version: 10.8.0
Syntax
public class CatalogContentLoader

Constructors

CatalogContentLoader(ICatalogSystem, IEnumerable<ICatalogContentBuilder>, ReferenceConverter, MetaClassToContentTypeMap)

Initializes a new instance of the CatalogContentLoader class.

Declaration
[Obsolete("Due to the new IContentCacheKeyCreator member, this constructor is no longer used. Please use the constructor including the IContentCacheKeyCreator instead. Will remain at least until April 2016.")]
public CatalogContentLoader(ICatalogSystem catalogSystem, IEnumerable<ICatalogContentBuilder> contentBuilders, ReferenceConverter referenceConverter, MetaClassToContentTypeMap metaClassMap)
Parameters
Type Name Description
ICatalogSystem catalogSystem

The catalog system.

System.Collections.Generic.IEnumerable<ICatalogContentBuilder> contentBuilders

The content builders.

ReferenceConverter referenceConverter

The reference converter.

MetaClassToContentTypeMap metaClassMap

The meta class map.

CatalogContentLoader(ICatalogSystem, IEnumerable<ICatalogContentBuilder>, ReferenceConverter, MetaClassToContentTypeMap, ISynchronizedObjectInstanceCache)

Initializes a new instance of the CatalogContentLoader class.

Declaration
[Obsolete("Due to the new IContentCacheKeyCreator member, this constructor is no longer used. Please use the constructor including the IContentCacheKeyCreator instead. Will remain at least until April 2017.")]
public CatalogContentLoader(ICatalogSystem catalogSystem, IEnumerable<ICatalogContentBuilder> contentBuilders, ReferenceConverter referenceConverter, MetaClassToContentTypeMap metaClassMap, ISynchronizedObjectInstanceCache objectInstanceCache)
Parameters
Type Name Description
ICatalogSystem catalogSystem

The catalog system.

System.Collections.Generic.IEnumerable<ICatalogContentBuilder> contentBuilders

The content builders.

ReferenceConverter referenceConverter

The reference converter.

MetaClassToContentTypeMap metaClassMap

The meta class map.

EPiServer.Framework.Cache.ISynchronizedObjectInstanceCache objectInstanceCache

The object instance cache.

CatalogContentLoader(ICatalogSystem, IEnumerable<ICatalogContentBuilder>, ReferenceConverter, MetaClassToContentTypeMap, ISynchronizedObjectInstanceCache, IContentCacheKeyCreator)

Initializes a new instance of the CatalogContentLoader class.

Declaration
public CatalogContentLoader(ICatalogSystem catalogSystem, IEnumerable<ICatalogContentBuilder> contentBuilders, ReferenceConverter referenceConverter, MetaClassToContentTypeMap metaClassMap, ISynchronizedObjectInstanceCache objectInstanceCache, IContentCacheKeyCreator contentCacheKeyCreator)
Parameters
Type Name Description
ICatalogSystem catalogSystem

The catalog system.

System.Collections.Generic.IEnumerable<ICatalogContentBuilder> contentBuilders

The content builders.

ReferenceConverter referenceConverter

The reference converter.

MetaClassToContentTypeMap metaClassMap

The meta class map.

EPiServer.Framework.Cache.ISynchronizedObjectInstanceCache objectInstanceCache

The object instance cache.

EPiServer.Core.IContentCacheKeyCreator contentCacheKeyCreator

Handles generation of cache keys.

Methods

GetCacheMasterKeys(CatalogContentBase)

Gets the cache master keys from MasterCacheKeys that this content should depend on.

Declaration
public virtual IEnumerable<string> GetCacheMasterKeys(CatalogContentBase content)
Parameters
Type Name Description
CatalogContentBase content

The content.

Returns
Type Description
System.Collections.Generic.IEnumerable<System.String>

The master cache keys.

GetCatalogEntries(ContentReference)

Gets the catalog entries.

Declaration
public virtual IList<GetChildrenReferenceResult> GetCatalogEntries(ContentReference parentLink)
Parameters
Type Name Description
EPiServer.Core.ContentReference parentLink

The parent link.

Returns
Type Description
System.Collections.Generic.IList<EPiServer.Core.GetChildrenReferenceResult>

GetCatalogEntries(ContentReference, Int32, Int32, out Int32)

Gets references to the child entries of a catalog or catalog node.

Declaration
public virtual IList<GetChildrenReferenceResult> GetCatalogEntries(ContentReference parentLink, int startIndex, int endIndex, out int totalCount)
Parameters
Type Name Description
EPiServer.Core.ContentReference parentLink

The parent link.

System.Int32 startIndex

The start index.

System.Int32 endIndex

The end index.

System.Int32 totalCount

Total number of catalog entries

Returns
Type Description
System.Collections.Generic.IList<EPiServer.Core.GetChildrenReferenceResult>

A list of EPiServer.Core.ContentReferences.

Remarks

This operation is uncached! Use the EPiServer.IContentRepository for getting content using cache.

GetCatalogEntryReferences(Int32)

Get the direct children of a catalog.

Declaration
protected virtual IList<GetChildrenReferenceResult> GetCatalogEntryReferences(int catalogId)
Parameters
Type Name Description
System.Int32 catalogId

Catalog Id.

Returns
Type Description
System.Collections.Generic.IList<EPiServer.Core.GetChildrenReferenceResult>

List of GetChildrenReferenceResult

GetCatalogNodes(ContentReference)

Gets references to the child nodes of a catalog or catalog node.

Declaration
public virtual IList<GetChildrenReferenceResult> GetCatalogNodes(ContentReference parentLink)
Parameters
Type Name Description
EPiServer.Core.ContentReference parentLink

The parent link.

Returns
Type Description
System.Collections.Generic.IList<EPiServer.Core.GetChildrenReferenceResult>

A list of EPiServer.Core.ContentReferences.

Remarks

This operation is uncached! Use the EPiServer.IContentRepository for getting content using cache.

GetItems<T>(IList<ContentReference>, String)

Gets the specified content, regardless content version.

Declaration
public virtual IList<T> GetItems<T>(IList<ContentReference> contentLinks, string language)
    where T : CatalogContentBase
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<T>

A list of instances of CatalogContentBase

Type Parameters
Name Description
T

CatalogContentBase or a subclass of it.

Remarks

This operation is uncached! Use the EPiServer.IContentRepository for getting content using cache.

GetItems<T>(IList<ContentReference>, String, IMarket)

Gets the specified content.

Declaration
[Obsolete("Use overload without IMarket parameter, it is not used. Will remain at least until April 2016.")]
public virtual IList<T> GetItems<T>(IList<ContentReference> contentLinks, string language, IMarket market)
    where T : CatalogContentBase
Parameters
Type Name Description
System.Collections.Generic.IList<EPiServer.Core.ContentReference> contentLinks

The content links.

System.String language

The content language.

IMarket market

The market filter.

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

A list of instances of CatalogContentBase

Type Parameters
Name Description
T

CatalogContentBase or a subclass of it.

Remarks

This operation is uncached! Use the EPiServer.IContentRepository for getting content using cache.

GetNodeEntryReferences(Int32)

Get the children of a catalog node.

Declaration
protected virtual IList<GetChildrenReferenceResult> GetNodeEntryReferences(int catalogNodeId)
Parameters
Type Name Description
System.Int32 catalogNodeId

Catalog Node Id

Returns
Type Description
System.Collections.Generic.IList<EPiServer.Core.GetChildrenReferenceResult>

List of GetChildrenReferenceResult

LoadSpecificContentInstances(IList<ContentReference>, String)

Loads the specific content instances.

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

The content links.

System.String language

The language branch.

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