public class DefaultCMSSiteService extends AbstractCMSService implements CMSSiteService
CMSSiteServiceAbstractService.SerializableDTOCURRENTCATALOGVERSION, CURRENTSITEmodelService, sessionService, txManagertenant| Constructor and Description |
|---|
DefaultCMSSiteService() |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.List<java.util.regex.Pattern> |
compilePatterns(java.util.Collection<java.lang.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) |
java.util.Collection<CatalogModel> |
getAllCatalogs(CMSSiteModel site)
Returns all catalogs for the specified site
site. |
protected CatalogVersionService |
getCatalogVersionService() |
java.util.List<CatalogModel> |
getClassificationCatalogs(CMSSiteModel site)
Gets the classification catalogs for
CMSSiteModel object. |
protected CMSPageService |
getCmsPageService()
Default getter for CMSPageService
|
protected CMSSiteDao |
getCmsSiteDao() |
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() |
CMSPageService |
lookupCmsPageService() |
protected boolean |
matches(java.lang.String input,
java.util.Collection<java.util.regex.Pattern> patterns) |
protected boolean |
matchSiteForURL(CMSSiteModel site,
java.lang.String strUrl) |
void |
setCatalogVersionService(CatalogVersionService catalogVersionService) |
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(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.
|
getBaseSiteService, getCurrentCatalogVersion, getCurrentSite, getSearchRestrictionService, getUserService, setBaseSiteService, setSearchRestrictionService, setUserServicegetModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerafterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplaceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCurrentCatalogVersion, getCurrentSitepublic boolean containsCatalog(CMSSiteModel site, CatalogModel catalog, boolean contentOnly)
containsCatalog in interface CMSSiteServicesite - the cms site modelcatalog - the catalog modelcontentOnly - if true, returns content catalogs onlyprotected boolean containsContentCatalogImpl(CMSSiteModel site, CatalogModel catalog)
protected boolean containsProductsCatalogImpl(CMSSiteModel site, CatalogModel catalog)
public java.util.Collection<CatalogModel> getAllCatalogs(CMSSiteModel site) throws java.lang.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 sitejava.lang.IllegalArgumentExceptionpublic java.util.List<CatalogModel> getClassificationCatalogs(CMSSiteModel site)
CMSSiteModel object.getClassificationCatalogs in interface CMSSiteServicesite - the CMSSiteModel object for which catalogs will be obtained.CatalogModel objects.public CMSSiteModel getSiteForURL(java.net.URL url) throws CMSItemNotFoundException
getSiteForURL in interface CMSSiteServiceurl - the urlCMSItemNotFoundException - if no site is associated with the given urlprotected boolean matchSiteForURL(CMSSiteModel site, java.lang.String strUrl)
public java.util.Collection<CMSSiteModel> getSites()
getSites in interface CMSSiteServicepublic java.lang.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()
java.lang.UnsupportedOperationExceptionprotected CatalogVersionService getCatalogVersionService()
public void setCatalogVersionService(CatalogVersionService catalogVersionService)
protected CMSSiteDao getCmsSiteDao()
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 CMSSiteServicesite - the cms site modelpublic CMSSiteModel setCurrentSite(java.net.URL url, PreviewDataModel previewData) throws CMSItemNotFoundException
setCurrentSite in interface CMSSiteServiceurl - the urlpreviewData - the preview data modelCMSItemNotFoundException - 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(java.lang.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(java.net.URL url, boolean setDefaultCatalog) throws CMSItemNotFoundException
setCurrentSiteAndCatalogVersionsForURL in interface CMSSiteServiceurl - 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 urlprotected java.util.List<java.util.regex.Pattern> compilePatterns(java.util.Collection<java.lang.String> stringPatterns)
protected CMSPageService getCmsPageService()
protected boolean matches(java.lang.String input,
java.util.Collection<java.util.regex.Pattern> patterns)
Copyright © 2018 SAP SE. All Rights Reserved.