Interface CMSCatalogVersionService
-
- All Known Implementing Classes:
DefaultCMSCatalogVersionService
public interface CMSCatalogVersionService
Service to retrieve catalog version information
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Map<CatalogModel,java.util.Set<CatalogVersionModel>>
getContentCatalogsAndVersions(boolean canRead, boolean canWrite, CMSSiteModel cmsSiteModel)
Returns all content catalogs and catalog versions which the current user has READ and/or WRITE permission for.java.util.List<CatalogVersionModel>
getFullHierarchyForCatalogVersion(CatalogVersionModel catalogVersion, CMSSiteModel cmsSiteModel)
Returns a sorted list of catalog versions based on the site's catalogs hierarchy.java.util.Map<CatalogModel,java.util.Set<CatalogVersionModel>>
getProductCatalogsAndVersions(boolean canRead, boolean canWrite, BaseSiteModel baseSiteModel)
Returns all product catalogs and catalog versions which the current user has READ and/or WRITE permission for.java.util.List<CatalogVersionModel>
getSubCatalogsCatalogVersions(ContentCatalogModel catalog)
Returns all catalog versions for all subcatalogs of the provided catalog.java.util.List<CatalogVersionModel>
getSuperCatalogsActiveCatalogVersions(ContentCatalogModel contentCatalog, CMSSiteModel cmsSiteModel)
Returns all active catalog versions from all available super catalogs.java.util.List<CatalogVersionModel>
getSuperCatalogsCatalogVersions(ContentCatalogModel catalog, CMSSiteModel cmsSiteModel)
Returns all catalog versions for all supercatalogs of the provided catalog.java.util.List<CatalogVersionModel>
getWritableChildContentCatalogVersions(PrincipalModel principal, CMSSiteModel siteModel, CatalogModel catalogModel)
Returns child content catalog versions for a catalog to which the principal has a write access.java.util.List<CatalogVersionModel>
getWritableContentCatalogVersions(PrincipalModel principal, CatalogModel catalogModel)
Returns content catalog versions for a catalog to which the principal has a write access.
-
-
-
Method Detail
-
getContentCatalogsAndVersions
java.util.Map<CatalogModel,java.util.Set<CatalogVersionModel>> getContentCatalogsAndVersions(boolean canRead, boolean canWrite, CMSSiteModel cmsSiteModel)
Returns all content catalogs and catalog versions which the current user has READ and/or WRITE permission for. It only returns catalogs that contain at-least a non active version for which we have the required permissions. An active catalog version is always considered readable.- Parameters:
canRead
- includes all catalog versions for which the user has read access when set totrue
canWrite
- includes all catalog versions for which the user has write access when set tofalse
cmsSiteModel
- model containing the content catalogs defined for the site- Returns:
- all catalogs and catalog versions permitted to the current user
-
getProductCatalogsAndVersions
java.util.Map<CatalogModel,java.util.Set<CatalogVersionModel>> getProductCatalogsAndVersions(boolean canRead, boolean canWrite, BaseSiteModel baseSiteModel)
Returns all product catalogs and catalog versions which the current user has READ and/or WRITE permission for.- Parameters:
canRead
- includes all catalog versions for which the user has read access when set totrue
canWrite
- includes all catalog versions for which the user has write access when set tofalse
baseSiteModel
- model containing the product catalogs defined for the site- Returns:
- all catalogs and catalog versions permitted to the current user
-
getWritableChildContentCatalogVersions
java.util.List<CatalogVersionModel> getWritableChildContentCatalogVersions(PrincipalModel principal, CMSSiteModel siteModel, CatalogModel catalogModel)
Returns child content catalog versions for a catalog to which the principal has a write access.- Parameters:
principal
- user modelsiteModel
- site modelcatalogModel
- catalog model- Returns:
- child content catalog versions
-
getWritableContentCatalogVersions
java.util.List<CatalogVersionModel> getWritableContentCatalogVersions(PrincipalModel principal, CatalogModel catalogModel)
Returns content catalog versions for a catalog to which the principal has a write access.- Parameters:
principal
- user modelcatalogModel
- catalog model- Returns:
- content catalog versions for catalog
-
getSubCatalogsCatalogVersions
java.util.List<CatalogVersionModel> getSubCatalogsCatalogVersions(ContentCatalogModel catalog)
Returns all catalog versions for all subcatalogs of the provided catalog.- Parameters:
catalog
- - catalog model- Returns:
- all catalog versions for all subcatalogs
-
getSuperCatalogsCatalogVersions
java.util.List<CatalogVersionModel> getSuperCatalogsCatalogVersions(ContentCatalogModel catalog, CMSSiteModel cmsSiteModel)
Returns all catalog versions for all supercatalogs of the provided catalog.- Parameters:
catalog
- - catalog modelcmsSiteModel
- - site model- Returns:
- all catalog versions for all supercatalogs.
-
getSuperCatalogsActiveCatalogVersions
java.util.List<CatalogVersionModel> getSuperCatalogsActiveCatalogVersions(ContentCatalogModel contentCatalog, CMSSiteModel cmsSiteModel)
Returns all active catalog versions from all available super catalogs.- Parameters:
contentCatalog
- - content catalog modelcmsSiteModel
- - site model- Returns:
- all active catalog versions for all super catalogs
-
getFullHierarchyForCatalogVersion
java.util.List<CatalogVersionModel> getFullHierarchyForCatalogVersion(CatalogVersionModel catalogVersion, CMSSiteModel cmsSiteModel)
Returns a sorted list of catalog versions based on the site's catalogs hierarchy. The first element in the list is the catalog version from the top catalog level. The last element in the list is the provided catalog version.- Parameters:
catalogVersion
- - catalog version model. This could be an active or non-active catalog version (Staged or Online)cmsSiteModel
- - site model- Returns:
- a sorted list of catalog versions
-
-