Interface CatalogLevelService
-
- All Known Implementing Classes:
DefaultCatalogLevelService
public interface CatalogLevelServiceService to retrieve information about the content catalogs hierarchy, which includes the catalogs ordering and the catalog levels
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Collection<ContentCatalogModel>getAllSubCatalogs(ContentCatalogModel catalog)Finds all child catalogs associated to the given content catalogjava.util.Collection<ContentCatalogModel>getAllSuperCatalogs(ContentCatalogModel catalog, CMSSiteModel cmsSiteModel)Find all super catalogs associated to the given content catalog.intgetCatalogLevel(ContentCatalogModel catalog)Determines the level of the given content catalog in the catalog hierarchyjava.util.List<CatalogVersionModel>getLevelCatalogVersions(AbstractPageModel page, java.util.List<ContentCatalogModel> catalogs)Finds all catalog versions hierarchy related to a given page for a given list of catalogs.java.util.List<ContentSlotModel>getSortedMultiCountryContentSlots(java.util.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 Detail
-
getLevelCatalogVersions
java.util.List<CatalogVersionModel> getLevelCatalogVersions(AbstractPageModel page, java.util.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
java.util.List<ContentSlotModel> getSortedMultiCountryContentSlots(java.util.List<ContentSlotModel> contentSlots)
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
int getCatalogLevel(ContentCatalogModel catalog)
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
boolean isIntermediateLevel(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 associations- Parameters:
catalog- - the content catalog to be evaluated- Returns:
- TRUE if the given content catalog is a intermediate level catalog; FALSE otherwise
-
isBottomLevel
boolean isBottomLevel(ContentCatalogModel catalog)
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
boolean isTopLevel(ContentCatalogModel catalog)
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
java.util.Collection<ContentCatalogModel> getAllSubCatalogs(ContentCatalogModel catalog)
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
java.util.Collection<ContentCatalogModel> getAllSuperCatalogs(ContentCatalogModel catalog, CMSSiteModel cmsSiteModel)
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
-
-