Script: Class dw.catalog.CatalogMgr

Class CatalogMgr

Provides helper methods for getting categories.

Properties

siteCatalog : Catalog Read Only

The catalog of the current site or null if no catalog is assigned to the site.

sortingOptions : List Read Only

A list containing the sorting options configured for this site.

sortingRules : Collection Read Only

A collection containing all of the sorting rules for this site, including global sorting rules.

Constructor Summary

This class does not have a constructor, so you cannot create it directly.

Method Summary

static getCatalog(id : String) : Catalog

Returns the catalog identified by the specified catalog id.

static getCategory(id : String) : Category

Returns the category of the site catalog identified by the specified category id.

static getSiteCatalog() : Catalog

Returns the catalog of the current site or null if no catalog is assigned to the site.

static getSortingOption(id : String) : SortingOption

Returns the sorting option with the given ID for this site, or null if there is no such option.

static getSortingOptions() : List

Returns a list containing the sorting options configured for this site.

static getSortingRule(id : String) : SortingRule

Returns the sorting rule with the given ID for this site, or null if there is no such rule.

static getSortingRules() : Collection

Returns a collection containing all of the sorting rules for this site, including global sorting rules.

Methods inherited from class Object

assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values

Method Detail

getCatalog

static getCatalog(id : String) : Catalog

Returns the catalog identified by the specified catalog id. Returns null if no catalog with the specified id exists in the current organization context.

Parameters:

id - Catalog id

Returns:

the catalog or null.

getCategory

static getCategory(id : String) : Category

Returns the category of the site catalog identified by the specified category id. Returns null if no site catalog is defined, or no category with the specified id is found in the site catalog.

Parameters:

id - the category identifier.

Returns:

the category of the site catalog identified by the specified category id or null if no site catalog is found.


getSiteCatalog

static getSiteCatalog() : Catalog

Returns the catalog of the current site or null if no catalog is assigned to the site.

Returns:

the catalog of the current site or null.


getSortingOption

static getSortingOption(id : String) : SortingOption

Returns the sorting option with the given ID for this site, or null if there is no such option.

Parameters:

id - the ID of the sorting option

Returns:

a SortingOption or null.


getSortingOptions

static getSortingOptions() : List

Returns a list containing the sorting options configured for this site.

Returns:

a list of SortingOption objects


getSortingRule

static getSortingRule(id : String) : SortingRule

Returns the sorting rule with the given ID for this site, or null if there is no such rule.

Parameters:

id - the ID of the sorting rule

Returns:

a SortingRule or null.


getSortingRules

static getSortingRules() : Collection

Returns a collection containing all of the sorting rules for this site, including global sorting rules.

Returns:

a collection of SortingRule objects