Class DefaultCatalogLevelService

    • Constructor Detail

      • DefaultCatalogLevelService

        public DefaultCatalogLevelService()
    • Method Detail

      • isTopLevel

        public boolean isTopLevel​(ContentCatalogModel catalog)
        Description copied from interface: CatalogLevelService
        Determines if the given content catalog is a root level catalog
        Specified by:
        isTopLevel in interface CatalogLevelService
        Parameters:
        catalog - - the content catalog to be evaluated
        Returns:
        TRUE if the given content catalog is a root level catalog; FALSE otherwise
      • isBottomLevel

        public boolean isBottomLevel​(ContentCatalogModel catalog)
        Description copied from interface: CatalogLevelService
        Determines if the given content catalog is a leaf level catalog
        Specified by:
        isBottomLevel in interface CatalogLevelService
        Parameters:
        catalog - - the content catalog to be evaluated
        Returns:
        TRUE if the given content catalog is a leaf level catalog; FALSE otherwise
      • isIntermediateLevel

        public boolean isIntermediateLevel​(ContentCatalogModel catalog)
        Description copied from interface: CatalogLevelService
        Determines 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:
        isIntermediateLevel in interface CatalogLevelService
        Parameters:
        catalog - - the content catalog to be evaluated
        Returns:
        TRUE if the given content catalog is a intermediate level catalog; FALSE otherwise
      • getCatalogLevel

        public int getCatalogLevel​(ContentCatalogModel catalog)
        Description copied from interface: CatalogLevelService
        Determines the level of the given content catalog in the catalog hierarchy
        Specified by:
        getCatalogLevel in interface CatalogLevelService
        Parameters:
        catalog - - the content catalog to be evaluated
        Returns:
        the catalog level in the catalog hierarchy
      • getAllSuperCatalogs

        protected java.util.Set<ContentCatalogModel> getAllSuperCatalogs​(java.util.Collection<ContentCatalogModel> contentCatalogs,
                                                                         java.util.List<ContentCatalogModel> siteCatalogs)
        Find all parent catalogs for the given content catalogs (called recursively)
        Parameters:
        contentCatalogs - - the content catalogs which parent catalogs should be found
        siteCatalogs - - the catalogs of a site which are used for searching
        Returns:
        all parent catalogs
      • getAllSuperCatalogs

        public java.util.Collection<ContentCatalogModel> getAllSuperCatalogs​(ContentCatalogModel catalog,
                                                                             CMSSiteModel cmsSiteModel)
        Description copied from interface: CatalogLevelService
        Find all super catalogs associated to the given content catalog. All catalogs belong to the active site.
        Specified by:
        getAllSuperCatalogs in interface CatalogLevelService
        Parameters:
        catalog - - the content catalog to be evaluated
        cmsSiteModel - - the site model
        Returns:
        a list of all super catalogs associated to the given catalog; never NULL
      • getAllSubCatalogs

        protected java.util.Set<ContentCatalogModel> getAllSubCatalogs​(java.util.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
      • getLevelCatalogVersions

        public java.util.List<CatalogVersionModel> getLevelCatalogVersions​(AbstractPageModel page,
                                                                           java.util.List<ContentCatalogModel> catalogs)
        Description copied from interface: CatalogLevelService
        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.
        Specified by:
        getLevelCatalogVersions in interface CatalogLevelService
        Parameters:
        page - - the page to find the catalog versions hierarchy
        catalogs - - list of content catalogs in the catalog hierarchy
        Returns:
        all catalog versions related to a given page
      • setCmsAdminSiteService

        public void setCmsAdminSiteService​(CMSAdminSiteService cmsAdminSiteService)
      • getCmsItemCatalogLevelComparator

        protected java.util.Comparator<ContentSlotModel> getCmsItemCatalogLevelComparator()
      • setCmsItemCatalogLevelComparator

        public void setCmsItemCatalogLevelComparator​(java.util.Comparator<ContentSlotModel> cmsItemCatalogLevelComparator)