Class DefaultCMSAdminSiteService
java.lang.Object
de.hybris.platform.servicelayer.internal.service.AbstractService
de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
de.hybris.platform.cms2.servicelayer.services.admin.impl.AbstractCMSAdminService
de.hybris.platform.cms2.servicelayer.services.admin.impl.DefaultCMSAdminSiteService
- All Implemented Interfaces:
CMSAdminSiteService,Serializable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean
public class DefaultCMSAdminSiteService
extends AbstractCMSAdminService
implements CMSAdminSiteService
Default implementation of the site service.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
AbstractService.SerializableDTO -
Field Summary
Fields inherited from class de.hybris.platform.cms2.servicelayer.services.admin.impl.AbstractCMSAdminService
ACTIVECATALOGVERSION, ACTIVESITE, CLONE_CONTEXT, ORIGINAL_ITEM_CONTEXT, RESTORE_CONTEXT, TYPE_CONTEXTFields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
modelService, sessionService, txManagerFields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
tenant -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAllCatalogs(CMSSiteModel site) Returns all catalogs for the specified sitesite.returns all composed type which extend the AbstractPageprotected CatalogVersionServiceReturns clone context.protected CMSSiteDaoReturns the original item context.Returns restore context.getSiteForId(String id) Returns a site with the given IDgetSites()Get all sites which are defined in the CMSReturns type context.protected TypeServicebooleanchecks if the current user has set an active catalog versionbooleanchecks if the current user has set an active sitebooleancheck if the active site has a preview urlbooleanhasPreviewURL(CMSSiteModel site) check if the given site has a preview urlvoidsetActiveCatalogVersion(CatalogVersionModel catalogVersion) Set a catalog version as active.voidsetActiveCatalogVersion(String catalogId, String versionId) Set a catalog version (via catalog id and version id) as active.voidsetActiveSite(CMSSiteModel site) Sets a site as active (the site the current user is working on)voidSets a site as active (the site the current user is working on)voidsetCatalogVersionService(CatalogVersionService catalogVersionService) voidsetCloneContext(Map<String, String> context) Set a clone context.voidsetCmsSiteDao(CMSSiteDao cmsSiteDao) voidsetOriginalItemContext(Map<String, Object> context) Set an original item context.voidsetRestoreContext(Map<String, Object> context) Set a restore context in the current session.voidsetTypeContext(Map<String, Object> context) Set a type context in the current session.voidsetTypeService(TypeService typeService) Methods inherited from class de.hybris.platform.cms2.servicelayer.services.admin.impl.AbstractCMSAdminService
getActiveCatalogVersion, getActiveSite, getBaseSiteService, getUserService, setBaseSiteService, setUserServiceMethods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerMethods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
afterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplaceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.cms2.servicelayer.services.admin.CMSAdminSiteService
getActiveCatalogVersion, getActiveSite
-
Constructor Details
-
DefaultCMSAdminSiteService
public DefaultCMSAdminSiteService()
-
-
Method Details
-
getSites
Description copied from interface:CMSAdminSiteServiceGet all sites which are defined in the CMS- Specified by:
getSitesin interfaceCMSAdminSiteService- Returns:
- collection of all sites
-
hasActiveSite
public boolean hasActiveSite()Description copied from interface:CMSAdminSiteServicechecks if the current user has set an active site- Specified by:
hasActiveSitein interfaceCMSAdminSiteService- Returns:
- true if there is an active site, otherwise false
-
setActiveSite
Description copied from interface:CMSAdminSiteServiceSets a site as active (the site the current user is working on)- Specified by:
setActiveSitein interfaceCMSAdminSiteService- Parameters:
site- the cms site model
-
hasActiveCatalogVersion
public boolean hasActiveCatalogVersion()Description copied from interface:CMSAdminSiteServicechecks if the current user has set an active catalog version- Specified by:
hasActiveCatalogVersionin interfaceCMSAdminSiteService- Returns:
- true if there is an active catalog version, otherwise false
-
setActiveCatalogVersion
public void setActiveCatalogVersion(String catalogId, String versionId) throws CMSItemNotFoundException Description copied from interface:CMSAdminSiteServiceSet a catalog version (via catalog id and version id) as active. The current user will work on that catalog version- Specified by:
setActiveCatalogVersionin interfaceCMSAdminSiteService- Parameters:
catalogId- the catalog idversionId- the version id- Throws:
CMSItemNotFoundException- if no catalog version with the given parameters is found
-
hasPreviewURL
public boolean hasPreviewURL()Description copied from interface:CMSAdminSiteServicecheck if the active site has a preview url- Specified by:
hasPreviewURLin interfaceCMSAdminSiteService- Returns:
- true if the active site has an preview url. False if no active site is set or no preview URL is provided.
-
hasPreviewURL
Description copied from interface:CMSAdminSiteServicecheck if the given site has a preview url- Specified by:
hasPreviewURLin interfaceCMSAdminSiteService- Parameters:
site- the site to check- Returns:
- true if the active site has an preview url. False if no active site is set or no preview URL is provided.
-
setActiveCatalogVersion
Description copied from interface:CMSAdminSiteServiceSet a catalog version as active. The current user will work on that catalog version- Specified by:
setActiveCatalogVersionin interfaceCMSAdminSiteService- Parameters:
catalogVersion- the catalog version model
-
getAllPageTypes
Description copied from interface:CMSAdminSiteServicereturns all composed type which extend the AbstractPage- Specified by:
getAllPageTypesin interfaceCMSAdminSiteService- Returns:
- all page types
-
getCmsSiteDao
-
setCmsSiteDao
-
getCatalogVersionService
-
setCatalogVersionService
-
getTypeService
-
setTypeService
-
getAllCatalogs
Description copied from interface:CMSAdminSiteServiceReturns all catalogs for the specified sitesite. 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.- Specified by:
getAllCatalogsin interfaceCMSAdminSiteService- Parameters:
site- the CMS site- Returns:
- all content, product and classification system catalogs associated with the site
-
getSiteForId
public CMSSiteModel getSiteForId(String id) throws AmbiguousIdentifierException, UnknownIdentifierException Description copied from interface:CMSAdminSiteServiceReturns a site with the given ID- Specified by:
getSiteForIdin interfaceCMSAdminSiteService- Parameters:
id- the id of the site- Returns:
- the site object
- Throws:
AmbiguousIdentifierException- thrown when more than one object has been found.UnknownIdentifierException- thrown when no object has been found
-
setActiveSiteForId
public void setActiveSiteForId(String id) throws AmbiguousIdentifierException, UnknownIdentifierException Description copied from interface:CMSAdminSiteServiceSets a site as active (the site the current user is working on)- Specified by:
setActiveSiteForIdin interfaceCMSAdminSiteService- Parameters:
id- id of the site- Throws:
AmbiguousIdentifierException- thrown when more than one object has been found.UnknownIdentifierException- thrown when no object has been found
-
setCloneContext
Description copied from interface:CMSAdminSiteServiceSet a clone context. Clone context contains site id, catalog id and catalog version. Clone context is used to detect that the new cloned element will be created in a catalog version different from active one.- Specified by:
setCloneContextin interfaceCMSAdminSiteService- Parameters:
context- clone context
-
getCloneContext
Description copied from interface:CMSAdminSiteServiceReturns clone context.- Specified by:
getCloneContextin interfaceCMSAdminSiteService- Returns:
- the clone context object
-
setOriginalItemContext
Description copied from interface:CMSAdminSiteServiceSet an original item context. The original item context contains cmsItem uid, catalog id and catalog version. The original item context is used to detect that the item is being modified by the facade layer and that theRelatedPageRejectionServiceshould not save this item part of its processing.- Specified by:
setOriginalItemContextin interfaceCMSAdminSiteService- Parameters:
context- original item context
-
getOriginalItemContext
Description copied from interface:CMSAdminSiteServiceReturns the original item context.- Specified by:
getOriginalItemContextin interfaceCMSAdminSiteService- Returns:
- the original item context object
-
setRestoreContext
Description copied from interface:CMSAdminSiteServiceSet a restore context in the current session. The restore context contains information about whether to override while restore or not.- Specified by:
setRestoreContextin interfaceCMSAdminSiteService- Parameters:
context- restore context
-
getRestoreContext
Description copied from interface:CMSAdminSiteServiceReturns restore context.- Specified by:
getRestoreContextin interfaceCMSAdminSiteService- Returns:
- the restore context object
-
setTypeContext
Description copied from interface:CMSAdminSiteServiceSet a type context in the current session. The type context contains information about read only mode for attributes.- Specified by:
setTypeContextin interfaceCMSAdminSiteService
-
getTypeContext
Description copied from interface:CMSAdminSiteServiceReturns type context.- Specified by:
getTypeContextin interfaceCMSAdminSiteService- Returns:
- the type context object.
-