Class DefaultCatalogLevelService
java.lang.Object
de.hybris.platform.cms2.multicountry.service.impl.DefaultCatalogLevelService
- All Implemented Interfaces:
CatalogLevelService
Default implementation of the
CatalogLevelService-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAllSubCatalogs(ContentCatalogModel catalog) Finds all child catalogs associated to the given content catalogprotected Set<ContentCatalogModel>getAllSubCatalogs(Collection<ContentCatalogModel> contentCatalogs) Find all children catalogs for the given content catalogs (called recursively).getAllSuperCatalogs(ContentCatalogModel catalog) Find all super catalogs associated to the given content catalog.getAllSuperCatalogs(ContentCatalogModel catalog, CMSSiteModel cmsSiteModel) Deprecated.protected Set<ContentCatalogModel>getAllSuperCatalogs(Collection<ContentCatalogModel> contentCatalogs) Find all parent catalogs for the given content catalogs (called recursively)intgetCatalogLevel(ContentCatalogModel catalog) Determines the level of the given content catalog in the catalog hierarchyprotected CMSAdminSiteServiceprotected Comparator<ContentSlotModel>getLevelCatalogVersions(AbstractPageModel page, List<ContentCatalogModel> catalogs) Finds all catalog versions hierarchy related to a given page for a given list of catalogs.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 catalogvoidsetCmsAdminSiteService(CMSAdminSiteService cmsAdminSiteService) voidsetCmsItemCatalogLevelComparator(Comparator<ContentSlotModel> cmsItemCatalogLevelComparator)
-
Constructor Details
-
DefaultCatalogLevelService
public DefaultCatalogLevelService()
-
-
Method Details
-
isTopLevel
Description copied from interface:CatalogLevelServiceDetermines if the given content catalog is a root level catalog- Specified by:
isTopLevelin interfaceCatalogLevelService- Parameters:
catalog- - the content catalog to be evaluated- Returns:
- TRUE if the given content catalog is a root level catalog; FALSE otherwise
-
isBottomLevel
Description copied from interface:CatalogLevelServiceDetermines if the given content catalog is a leaf level catalog- Specified by:
isBottomLevelin interfaceCatalogLevelService- Parameters:
catalog- - the content catalog to be evaluated- Returns:
- TRUE if the given content catalog is a leaf level catalog; FALSE otherwise
-
isIntermediateLevel
Description copied from interface:CatalogLevelServiceDetermines if the given content catalog is an intermediate level catalog, such that it has a parent and at least one child catalog associations- Specified by:
isIntermediateLevelin interfaceCatalogLevelService- Parameters:
catalog- - the content catalog to be evaluated- Returns:
- TRUE if the given content catalog is a intermediate level catalog; FALSE otherwise
-
getCatalogLevel
Description copied from interface:CatalogLevelServiceDetermines the level of the given content catalog in the catalog hierarchy- Specified by:
getCatalogLevelin interfaceCatalogLevelService- Parameters:
catalog- - the content catalog to be evaluated- Returns:
- the catalog level in the catalog hierarchy
-
getAllSuperCatalogs
protected Set<ContentCatalogModel> getAllSuperCatalogs(Collection<ContentCatalogModel> contentCatalogs) Find all parent catalogs for the given content catalogs (called recursively)- Parameters:
contentCatalogs- - the content catalogs which parent catalogs should be found- Returns:
- all parent catalogs
-
getAllSuperCatalogs
@Deprecated(since="2105") public Collection<ContentCatalogModel> getAllSuperCatalogs(ContentCatalogModel catalog, CMSSiteModel cmsSiteModel) Deprecated.since 2105, please useCatalogLevelService.getAllSuperCatalogs(ContentCatalogModel)Description copied from interface:CatalogLevelServiceFind all super catalogs associated to the given content catalog. All catalogs belong to the active site.- Specified by:
getAllSuperCatalogsin interfaceCatalogLevelService- 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
Description copied from interface:CatalogLevelServiceFind all super catalogs associated to the given content catalog.- Specified by:
getAllSuperCatalogsin interfaceCatalogLevelService- Parameters:
catalog- - the content catalog to be evaluated- Returns:
- a list of all super catalogs associated to the given catalog; never NULL
-
getAllSubCatalogs
protected Set<ContentCatalogModel> getAllSubCatalogs(Collection<ContentCatalogModel> contentCatalogs) Find all children catalogs for the given content catalogs (called recursively).- Parameters:
contentCatalogs- - the content catalogs which children catalogs should be found- Returns:
- all children catalogs
-
getAllSubCatalogs
Description copied from interface:CatalogLevelServiceFinds all child catalogs associated to the given content catalog- Specified by:
getAllSubCatalogsin interfaceCatalogLevelService- Parameters:
catalog- - the content catalog- Returns:
- a list of all child content catalogs associated to the given catalog; never NULL
-
getSortedMultiCountryContentSlots
Description copied from interface:CatalogLevelServiceOrders the given content slots according to the catalog level where the slots are defined. This uses theCMSItemCatalogLevelComparatorto determine the ordering.- Specified by:
getSortedMultiCountryContentSlotsin interfaceCatalogLevelService- Parameters:
list- - the content slots to be sorted- Returns:
- a sorted list of content slots
-
getLevelCatalogVersions
public List<CatalogVersionModel> getLevelCatalogVersions(AbstractPageModel page, List<ContentCatalogModel> catalogs) Description copied from interface:CatalogLevelServiceFinds 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.- Specified by:
getLevelCatalogVersionsin interfaceCatalogLevelService- 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
-
getCmsAdminSiteService
-
setCmsAdminSiteService
-
getCmsItemCatalogLevelComparator
-
setCmsItemCatalogLevelComparator
public void setCmsItemCatalogLevelComparator(Comparator<ContentSlotModel> cmsItemCatalogLevelComparator)
-
CatalogLevelService.getAllSuperCatalogs(ContentCatalogModel)