public interface CMSSiteService
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsCatalog(CMSSiteModel site,
CatalogModel catalog,
boolean contentOnly)
checks if a given site contains the given catalog
|
Collection<CatalogModel> |
getAllCatalogs(CMSSiteModel site)
Returns all catalogs for the specified site
site. |
List<CatalogModel> |
getClassificationCatalogs(CMSSiteModel site)
Gets the classification catalogs for
CMSSiteModel object. |
CatalogVersionModel |
getCurrentCatalogVersion()
Returns current catalog version from the session for current user.
|
CMSSiteModel |
getCurrentSite()
Returns current site from the session for current user.
|
List<CatalogModel> |
getProductCatalogs(CMSSiteModel site)
Deprecated.
|
CMSSiteModel |
getSiteForURL(URL url)
Returns the site which is associated with the given url
|
Collection<CMSSiteModel> |
getSites() |
String |
getStartPageLabelOrId(CMSSiteModel site)
Gets the start page label or id.
|
boolean |
hasCurrentCatalogVersion() |
boolean |
hasCurrentSite() |
void |
setCurrentCatalogVersion(CatalogVersionModel catalogVersion)
sets a catalogversion as current catalogversion
|
void |
setCurrentSite(CMSSiteModel site)
sets the given site as current
|
CMSSiteModel |
setCurrentSite(URL url,
PreviewDataModel previewData)
Sets the site that is associated with the given url as current site.
|
void |
setCurrentSiteAndCatalogVersions(CMSSiteModel site,
boolean setDefaultCatalog)
Activates the given site and all associated catalog versions.
|
CMSSiteModel |
setCurrentSiteAndCatalogVersions(String siteId,
boolean setDefaultCatalog)
Activates a CMSSite and all associated catalog versions.
|
CMSSiteModel |
setCurrentSiteAndCatalogVersionsForURL(URL url,
boolean setDefaultCatalog)
Sets the site that is associated with the given url as current site.
|
boolean containsCatalog(CMSSiteModel site, CatalogModel catalog, boolean contentOnly)
site - catalog - contentOnly - Collection<CatalogModel> getAllCatalogs(CMSSiteModel site)
site. This means all the content catalogs of the
site as well as the product and classification system catalogs which belong to the stores associated
with the site.site - the CMS siteList<CatalogModel> getClassificationCatalogs(CMSSiteModel site)
CMSSiteModel object.site - the CMSSiteModel object for which catalogs will be obtained.CatalogModel objects.CatalogVersionModel getCurrentCatalogVersion()
CMSSiteModel getCurrentSite()
@Deprecated List<CatalogModel> getProductCatalogs(CMSSiteModel site)
BaseSiteService.getProductCatalogs(de.hybris.platform.basecommerce.model.site.BaseSiteModel)
instead.CMSSiteModel object.site - the CMSSiteModel object for which catalogs will be obtained.CatalogModel objects.CMSSiteModel getSiteForURL(URL url) throws CMSItemNotFoundException
url - CMSItemNotFoundException - if no site is associated with the given urlCollection<CMSSiteModel> getSites()
String getStartPageLabelOrId(CMSSiteModel site)
site - he CMSSiteModel objectboolean hasCurrentCatalogVersion()
boolean hasCurrentSite()
void setCurrentCatalogVersion(CatalogVersionModel catalogVersion) throws CMSItemNotFoundException
catalogVersion - the catalogversion to be set as currentCMSItemNotFoundException - if the current site does not contain the catalog (catalogversion)void setCurrentSite(CMSSiteModel site)
site - CMSSiteModel setCurrentSite(URL url, PreviewDataModel previewData) throws CMSItemNotFoundException
url - previewData - CMSItemNotFoundException - if no site is associated with the given urlvoid setCurrentSiteAndCatalogVersions(CMSSiteModel site, boolean setDefaultCatalog) throws CMSItemNotFoundException
site - site to activatesetDefaultCatalog - if set to true the default catalog will be activated as currentcatalog.CMSItemNotFoundException - if not site with the given id could be found, no active catalogversion could be found for the
associated catalogs or if setDefaultCatalog is set to true and no default catalog is setCMSSiteModel setCurrentSiteAndCatalogVersions(String siteId, boolean setDefaultCatalog) throws CMSItemNotFoundException
siteId - id of the site to activatesetDefaultCatalog - if set to true the default catalog will be activated as currentcatalog.CMSItemNotFoundException - if no site with the given id could be found, no active catalogversion could be found for the associated
catalogs or if setDefaultCatalog is set to true and no default catalog is setCMSSiteModel setCurrentSiteAndCatalogVersionsForURL(URL url, boolean setDefaultCatalog) throws CMSItemNotFoundException
url - setDefaultCatalog - if set to true the default catalog (with the active version) will be set as current catalogversion. This
is only done when the current catalogversion is null.CMSItemNotFoundException - if no site is associated with the given urlCopyright © 2017 SAP SE. All Rights Reserved.