Interface CatalogLevelService
- All Known Implementing Classes:
DefaultCatalogLevelService
public interface CatalogLevelService
Service to retrieve information about the content catalogs hierarchy, which includes the catalogs ordering and the
catalog levels
-
Method Summary
Modifier and TypeMethodDescriptiongetAllSubCatalogs(ContentCatalogModel catalog) Finds all child catalogs associated to the given content cataloggetAllSuperCatalogs(ContentCatalogModel catalog) Find all super catalogs associated to the given content catalog.getAllSuperCatalogs(ContentCatalogModel catalog, CMSSiteModel cmsSiteModel) Deprecated.intgetCatalogLevel(ContentCatalogModel catalog) Determines the level of the given content catalog in the catalog hierarchygetLevelCatalogVersions(AbstractPageModel page, List<ContentCatalogModel> catalogs) Finds all catalog versions hierarchy related to a given page for a given list of catalogs.getSortedMultiCountryContentSlots(List<ContentSlotModel> contentSlots) Orders the given content slots according to the catalog level where the slots are defined.booleanisBottomLevel(ContentCatalogModel catalog) Determines if the given content catalog is a leaf level catalogbooleanisIntermediateLevel(ContentCatalogModel catalog) Determines if the given content catalog is an intermediate level catalog, such that it has a parent and at least one child catalog associationsbooleanisTopLevel(ContentCatalogModel catalog) Determines if the given content catalog is a root level catalog
-
Method Details
-
getLevelCatalogVersions
List<CatalogVersionModel> getLevelCatalogVersions(AbstractPageModel page, List<ContentCatalogModel> catalogs) Finds all catalog versions hierarchy related to a given page for a given list of catalogs. For example, if a page is localized and contains contents from the local and root catalogs, then the result will contain the online root catalog along with the staged version of the local catalog.- Parameters:
page- - the page to find the catalog versions hierarchycatalogs- - list of content catalogs in the catalog hierarchy- Returns:
- all catalog versions related to a given page
-
getSortedMultiCountryContentSlots
Orders the given content slots according to the catalog level where the slots are defined. This uses theCMSItemCatalogLevelComparatorto determine the ordering.- Parameters:
contentSlots- - the content slots to be sorted- Returns:
- a sorted list of content slots
-
getCatalogLevel
Determines the level of the given content catalog in the catalog hierarchy- Parameters:
catalog- - the content catalog to be evaluated- Returns:
- the catalog level in the catalog hierarchy
-
isIntermediateLevel
Determines if the given content catalog is an intermediate level catalog, such that it has a parent and at least one child catalog associations- Parameters:
catalog- - the content catalog to be evaluated- Returns:
- TRUE if the given content catalog is a intermediate level catalog; FALSE otherwise
-
isBottomLevel
Determines if the given content catalog is a leaf level catalog- Parameters:
catalog- - the content catalog to be evaluated- Returns:
- TRUE if the given content catalog is a leaf level catalog; FALSE otherwise
-
isTopLevel
Determines if the given content catalog is a root level catalog- Parameters:
catalog- - the content catalog to be evaluated- Returns:
- TRUE if the given content catalog is a root level catalog; FALSE otherwise
-
getAllSubCatalogs
Finds all child catalogs associated to the given content catalog- Parameters:
catalog- - the content catalog- Returns:
- a list of all child content catalogs associated to the given catalog; never NULL
-
getAllSuperCatalogs
@Deprecated(since="2105") Collection<ContentCatalogModel> getAllSuperCatalogs(ContentCatalogModel catalog, CMSSiteModel cmsSiteModel) Deprecated.since 2105, please usegetAllSuperCatalogs(ContentCatalogModel)Find all super catalogs associated to the given content catalog. All catalogs belong to the active site.- Parameters:
catalog- - the content catalog to be evaluatedcmsSiteModel- - the site model- Returns:
- a list of all super catalogs associated to the given catalog; never NULL
-
getAllSuperCatalogs
Find all super catalogs associated to the given content catalog.- Parameters:
catalog- - the content catalog to be evaluated- Returns:
- a list of all super catalogs associated to the given catalog; never NULL
-
getAllSuperCatalogs(ContentCatalogModel)