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
|
java.util.Collection<CatalogModel> |
getAllCatalogs(CMSSiteModel site)
Returns all catalogs for the specified site
site. |
java.util.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.
|
CMSSiteModel |
getSiteForURL(java.net.URL url)
Returns the site which is associated with the given url
|
java.util.Collection<CMSSiteModel> |
getSites() |
java.lang.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(java.net.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(java.lang.String siteId,
boolean setDefaultCatalog)
Activates a CMSSite and all associated catalog versions.
|
CMSSiteModel |
setCurrentSiteAndCatalogVersionsForURL(java.net.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 - the cms site modelcatalog - the catalog modelcontentOnly - if true, returns content catalogs onlyjava.util.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 sitejava.util.List<CatalogModel> getClassificationCatalogs(CMSSiteModel site)
CMSSiteModel object.site - the CMSSiteModel object for which catalogs will be obtained.CatalogModel objects.CatalogVersionModel getCurrentCatalogVersion()
CMSSiteModel getCurrentSite()
CMSSiteModel getSiteForURL(java.net.URL url) throws CMSItemNotFoundException
url - the urlCMSItemNotFoundException - if no site is associated with the given urljava.util.Collection<CMSSiteModel> getSites()
java.lang.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 - the cms site modelCMSSiteModel setCurrentSite(java.net.URL url, PreviewDataModel previewData) throws CMSItemNotFoundException
url - the urlpreviewData - the preview data modelCMSItemNotFoundException - 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(java.lang.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(java.net.URL url, boolean setDefaultCatalog) throws CMSItemNotFoundException
url - the urlsetDefaultCatalog - 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 © 2018 SAP SE. All Rights Reserved.