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,java.io.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:
- Serialized Form
-
-
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_CONTEXT
-
Fields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
modelService, sessionService, txManager
-
Fields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
tenant
-
-
Constructor Summary
Constructors Constructor Description DefaultCMSAdminSiteService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<CatalogModel>getAllCatalogs(CMSSiteModel site)Returns all catalogs for the specified sitesite.java.util.Collection<ComposedTypeModel>getAllPageTypes()returns all composed type which extend the AbstractPageprotected CatalogVersionServicegetCatalogVersionService()java.util.Map<java.lang.String,java.lang.String>getCloneContext()Returns clone context.protected CMSSiteDaogetCmsSiteDao()java.util.Map<java.lang.String,java.lang.Object>getOriginalItemContext()Returns the original item context.java.util.Map<java.lang.String,java.lang.Object>getRestoreContext()Returns restore context.CMSSiteModelgetSiteForId(java.lang.String id)Returns a site with the given IDjava.util.Collection<CMSSiteModel>getSites()Get all sites which are defined in the CMSjava.util.Map<java.lang.String,java.lang.Object>getTypeContext()Returns type context.protected TypeServicegetTypeService()booleanhasActiveCatalogVersion()checks if the current user has set an active catalog versionbooleanhasActiveSite()checks if the current user has set an active sitebooleanhasPreviewURL()check 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(java.lang.String catalogId, java.lang.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)voidsetActiveSiteForId(java.lang.String id)Sets a site as active (the site the current user is working on)voidsetCatalogVersionService(CatalogVersionService catalogVersionService)voidsetCloneContext(java.util.Map<java.lang.String,java.lang.String> context)Set a clone context.voidsetCmsSiteDao(CMSSiteDao cmsSiteDao)voidsetOriginalItemContext(java.util.Map<java.lang.String,java.lang.Object> context)Set an original item context.voidsetRestoreContext(java.util.Map<java.lang.String,java.lang.Object> context)Set a restore context in the current session.voidsetTypeContext(java.util.Map<java.lang.String,java.lang.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, setUserService
-
Methods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManager
-
Methods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
afterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplace
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.hybris.platform.cms2.servicelayer.services.admin.CMSAdminSiteService
getActiveCatalogVersion, getActiveSite
-
-
-
-
Method Detail
-
getSites
public java.util.Collection<CMSSiteModel> 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
public void setActiveSite(CMSSiteModel site)
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(java.lang.String catalogId, java.lang.String versionId) throws CMSItemNotFoundExceptionDescription 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
public boolean hasPreviewURL(CMSSiteModel site)
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
public void setActiveCatalogVersion(CatalogVersionModel catalogVersion)
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
public java.util.Collection<ComposedTypeModel> getAllPageTypes()
Description copied from interface:CMSAdminSiteServicereturns all composed type which extend the AbstractPage- Specified by:
getAllPageTypesin interfaceCMSAdminSiteService- Returns:
- all page types
-
getCmsSiteDao
protected CMSSiteDao getCmsSiteDao()
-
setCmsSiteDao
public void setCmsSiteDao(CMSSiteDao cmsSiteDao)
-
getCatalogVersionService
protected CatalogVersionService getCatalogVersionService()
-
setCatalogVersionService
public void setCatalogVersionService(CatalogVersionService catalogVersionService)
-
getTypeService
protected TypeService getTypeService()
-
setTypeService
public void setTypeService(TypeService typeService)
-
getAllCatalogs
public java.util.Collection<CatalogModel> getAllCatalogs(CMSSiteModel site)
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(java.lang.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(java.lang.String id) throws AmbiguousIdentifierException, UnknownIdentifierExceptionDescription 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
public void setCloneContext(java.util.Map<java.lang.String,java.lang.String> context)
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
public java.util.Map<java.lang.String,java.lang.String> getCloneContext()
Description copied from interface:CMSAdminSiteServiceReturns clone context.- Specified by:
getCloneContextin interfaceCMSAdminSiteService- Returns:
- the clone context object
-
setOriginalItemContext
public void setOriginalItemContext(java.util.Map<java.lang.String,java.lang.Object> context)
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
public java.util.Map<java.lang.String,java.lang.Object> getOriginalItemContext()
Description copied from interface:CMSAdminSiteServiceReturns the original item context.- Specified by:
getOriginalItemContextin interfaceCMSAdminSiteService- Returns:
- the original item context object
-
setRestoreContext
public void setRestoreContext(java.util.Map<java.lang.String,java.lang.Object> context)
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
public java.util.Map<java.lang.String,java.lang.Object> getRestoreContext()
Description copied from interface:CMSAdminSiteServiceReturns restore context.- Specified by:
getRestoreContextin interfaceCMSAdminSiteService- Returns:
- the restore context object
-
setTypeContext
public void setTypeContext(java.util.Map<java.lang.String,java.lang.Object> context)
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
public java.util.Map<java.lang.String,java.lang.Object> getTypeContext()
Description copied from interface:CMSAdminSiteServiceReturns type context.- Specified by:
getTypeContextin interfaceCMSAdminSiteService- Returns:
- the type context object.
-
-