public class DefaultCMSSiteService extends AbstractCMSService implements CMSSiteService
CMSSiteServiceAbstractService.SerializableDTO| Modifier and Type | Field and Description |
|---|---|
protected CatalogService |
catalogService
Deprecated.
Implement the CatalogService as own property
|
protected CMSSiteDao |
cmsSiteDao
Deprecated.
Implement the CMSSiteDao as own property
|
CURRENTCATALOGVERSION, CURRENTSITEmodelService, sessionService, txManagertenant| Constructor and Description |
|---|
DefaultCMSSiteService() |
| Modifier and Type | Method and Description |
|---|---|
protected List<Pattern> |
compilePatterns(Collection<String> stringPatterns) |
boolean |
containsCatalog(CMSSiteModel site,
CatalogModel catalog,
boolean contentOnly)
checks if a given site contains the given catalog
|
protected boolean |
containsContentCatalogImpl(CMSSiteModel site,
CatalogModel catalog) |
protected boolean |
containsProductsCatalogImpl(CMSSiteModel site,
CatalogModel 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. |
protected CMSPageService |
getCmsPageService()
Default getter for CMSPageService
|
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() |
CMSPageService |
lookupCmsPageService() |
protected boolean |
matches(String input,
Collection<Pattern> patterns) |
protected boolean |
matchSiteForURL(CMSSiteModel site,
String strUrl) |
void |
setCatalogService(CatalogService catalogService) |
void |
setCmsSiteDao(CMSSiteDao cmsSiteDao) |
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.
|
getBaseSiteService, getCurrentCatalogVersion, getCurrentSite, getSearchRestrictionService, getUserService, setBaseSiteService, setSearchRestrictionService, setUserServicegetModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerafterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, setTenantScope, writeReplaceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCurrentCatalogVersion, getCurrentSite@Deprecated protected CMSSiteDao cmsSiteDao
@Deprecated protected CatalogService catalogService
public boolean containsCatalog(CMSSiteModel site, CatalogModel catalog, boolean contentOnly)
containsCatalog in interface CMSSiteServiceprotected boolean containsContentCatalogImpl(CMSSiteModel site, CatalogModel catalog)
protected boolean containsProductsCatalogImpl(CMSSiteModel site, CatalogModel catalog)
public Collection<CatalogModel> getAllCatalogs(CMSSiteModel site) throws IllegalArgumentException
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.getAllCatalogs in interface CMSSiteServicesite - the CMS siteIllegalArgumentExceptionpublic List<CatalogModel> getClassificationCatalogs(CMSSiteModel site)
CMSSiteModel object.getClassificationCatalogs in interface CMSSiteServicesite - the CMSSiteModel object for which catalogs will be obtained.CatalogModel objects.@Deprecated public List<CatalogModel> getProductCatalogs(CMSSiteModel site)
CMSSiteModel object.getProductCatalogs in interface CMSSiteServicesite - the CMSSiteModel object for which catalogs will be obtained.CatalogModel objects.public CMSSiteModel getSiteForURL(URL url) throws CMSItemNotFoundException
getSiteForURL in interface CMSSiteServiceCMSItemNotFoundException - if no site is associated with the given urlprotected boolean matchSiteForURL(CMSSiteModel site, String strUrl)
public Collection<CMSSiteModel> getSites()
getSites in interface CMSSiteServicepublic String getStartPageLabelOrId(CMSSiteModel site)
getStartPageLabelOrId in interface CMSSiteServicesite - he CMSSiteModel objectpublic boolean hasCurrentCatalogVersion()
hasCurrentCatalogVersion in interface CMSSiteServicepublic boolean hasCurrentSite()
hasCurrentSite in interface CMSSiteServicepublic CMSPageService lookupCmsPageService()
UnsupportedOperationExceptionpublic void setCatalogService(CatalogService catalogService)
public void setCmsSiteDao(CMSSiteDao cmsSiteDao)
public void setCurrentCatalogVersion(CatalogVersionModel catalogVersion) throws CMSItemNotFoundException
setCurrentCatalogVersion in interface CMSSiteServicecatalogVersion - the catalogversion to be set as currentCMSItemNotFoundException - if the current site does not contain the catalog (catalogversion)public void setCurrentSite(CMSSiteModel site)
setCurrentSite in interface CMSSiteServicepublic CMSSiteModel setCurrentSite(URL url, PreviewDataModel previewData) throws CMSItemNotFoundException
setCurrentSite in interface CMSSiteServiceCMSItemNotFoundException - if no site is associated with the given urlpublic void setCurrentSiteAndCatalogVersions(CMSSiteModel site, boolean setDefaultCatalog) throws CMSItemNotFoundException
setCurrentSiteAndCatalogVersions in interface CMSSiteServicesite - 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 setpublic CMSSiteModel setCurrentSiteAndCatalogVersions(String siteId, boolean setDefaultCatalog) throws CMSItemNotFoundException
setCurrentSiteAndCatalogVersions in interface CMSSiteServicesiteId - 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 setpublic CMSSiteModel setCurrentSiteAndCatalogVersionsForURL(URL url, boolean setDefaultCatalog) throws CMSItemNotFoundException
setCurrentSiteAndCatalogVersionsForURL in interface CMSSiteServicesetDefaultCatalog - 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 urlprotected List<Pattern> compilePatterns(Collection<String> stringPatterns)
protected CMSPageService getCmsPageService()
protected boolean matches(String input, Collection<Pattern> patterns)
Copyright © 2017 SAP SE. All Rights Reserved.