Class DefaultCMSContentSlotService
- java.lang.Object
-
- de.hybris.platform.servicelayer.internal.service.AbstractService
-
- de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
-
- de.hybris.platform.cms2.servicelayer.services.impl.AbstractCMSService
-
- de.hybris.platform.cms2.servicelayer.services.impl.DefaultCMSContentSlotService
-
- All Implemented Interfaces:
CMSContentSlotService
,java.io.Serializable
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanNameAware
,org.springframework.beans.factory.InitializingBean
public class DefaultCMSContentSlotService extends AbstractCMSService implements CMSContentSlotService
Default implementation ofCMSContentSlotService
- 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.impl.AbstractCMSService
CURRENTCATALOGVERSION, CURRENTSITE
-
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 DefaultCMSContentSlotService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAvailableContentSlotsNames(AbstractPageModel page)
Gets the available content slots names and return them as semicolon separated string ("foo; bar; baz").protected CatalogVersionService
getCatalogVersionService()
protected CMSContentSlotDao
getCmsContentSlotDao()
protected CMSDataFactory
getCmsDataFactory()
protected CMSPageService
getCmsPageService()
CMSRestrictionService
getCmsRestrictionService()
ContentSlotModel
getContentSlotForId(java.lang.String id)
Gets the content slot for given id.java.util.List<java.lang.String>
getDefinedContentSlotPositions(AbstractPageModel page)
Gets the defined content slot positions.java.util.List<java.lang.String>
getDefinedContentSlotPositions(PageTemplateModel pageTemplate)
Gets the defined content slot positions.java.lang.String
getMissingContentSlotsNames(AbstractPageModel page)
Gets the missing content slots names and return them as semicolon separated string ("foo; bar; baz").java.util.Collection<AbstractPageModel>
getPagesForContentSlot(ContentSlotModel contentSlot)
Gets the relatedAbstractPageModel
objects for content slot.java.util.List<SimpleCMSComponentModel>
getSimpleCMSComponents(ContentSlotModel contentSlot, boolean previewEnabled, javax.servlet.http.HttpServletRequest httpRequest)
Retrieves a list of components that are valid for particular content slotprotected RestrictionData
populate(javax.servlet.http.HttpServletRequest request)
Wrapped all information fetched from current HTTP requestvoid
setCatalogVersionService(CatalogVersionService catalogVersionService)
void
setCmsContentSlotDao(CMSContentSlotDao cmsContentSlotDao)
void
setCmsDataFactory(CMSDataFactory cmsDataFactory)
void
setCmsPageService(CMSPageService cmsPageService)
void
setCmsRestrictionService(CMSRestrictionService cmsRestrictionService)
-
Methods inherited from class de.hybris.platform.cms2.servicelayer.services.impl.AbstractCMSService
getBaseSiteService, getCurrentCatalogVersion, getCurrentSite, getSearchRestrictionService, getUserService, setBaseSiteService, setSearchRestrictionService, 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
-
-
-
-
Method Detail
-
getAvailableContentSlotsNames
public java.lang.String getAvailableContentSlotsNames(AbstractPageModel page)
Gets the available content slots names and return them as semicolon separated string ("foo; bar; baz").- Specified by:
getAvailableContentSlotsNames
in interfaceCMSContentSlotService
- Parameters:
page
- theAbstractPageModel
object. *- Returns:
- the available content slots names as semicolon separated string.
-
getDefinedContentSlotPositions
public java.util.List<java.lang.String> getDefinedContentSlotPositions(AbstractPageModel page)
Gets the defined content slot positions.- Specified by:
getDefinedContentSlotPositions
in interfaceCMSContentSlotService
- Parameters:
page
- the page- Returns:
- the defined content slot positions
-
getDefinedContentSlotPositions
public java.util.List<java.lang.String> getDefinedContentSlotPositions(PageTemplateModel pageTemplate)
Gets the defined content slot positions.- Specified by:
getDefinedContentSlotPositions
in interfaceCMSContentSlotService
- Parameters:
pageTemplate
- the page template- Returns:
- the defined content slot positions
-
getMissingContentSlotsNames
public java.lang.String getMissingContentSlotsNames(AbstractPageModel page)
Gets the missing content slots names and return them as semicolon separated string ("foo; bar; baz").- Specified by:
getMissingContentSlotsNames
in interfaceCMSContentSlotService
- Parameters:
page
- theAbstractPageModel
object.- Returns:
- the missing content slots names.
-
getPagesForContentSlot
public java.util.Collection<AbstractPageModel> getPagesForContentSlot(ContentSlotModel contentSlot)
Gets the relatedAbstractPageModel
objects for content slot.- Specified by:
getPagesForContentSlot
in interfaceCMSContentSlotService
- Parameters:
contentSlot
- theContentSlotModel
object for which pages will be obtained.- Returns:
- the collection of
AbstractPageModel
objects related toContentSlotModel
object.
-
getSimpleCMSComponents
public java.util.List<SimpleCMSComponentModel> getSimpleCMSComponents(ContentSlotModel contentSlot, boolean previewEnabled, javax.servlet.http.HttpServletRequest httpRequest)
Retrieves a list of components that are valid for particular content slot Note: Filters components that are assigned to given content slot according to their restrictions. For more information please see- Specified by:
getSimpleCMSComponents
in interfaceCMSContentSlotService
- Parameters:
contentSlot
- given content slotpreviewEnabled
- flag that indicates whether preview is enabledhttpRequest
- current HTTP request- Returns:
- valid components
- See Also:
CMSRestrictionService.evaluateCMSComponent(de.hybris.platform.cms2.model.contents.components.AbstractCMSComponentModel, de.hybris.platform.cms2.servicelayer.data.RestrictionData)
-
populate
protected RestrictionData populate(javax.servlet.http.HttpServletRequest request)
Wrapped all information fetched from current HTTP request- Parameters:
request
- current HTTP request- Returns:
- all gather information wrapped to
RestrictionData
object
-
getContentSlotForId
public ContentSlotModel getContentSlotForId(java.lang.String id) throws AmbiguousIdentifierException, UnknownIdentifierException
Description copied from interface:CMSContentSlotService
Gets the content slot for given id.- Specified by:
getContentSlotForId
in interfaceCMSContentSlotService
- Parameters:
id
- the id of content slot to find- Returns:
- found content slot
- Throws:
AmbiguousIdentifierException
- thrown when more than one object has been found.UnknownIdentifierException
- thrown when no object has been found
-
getCmsContentSlotDao
protected CMSContentSlotDao getCmsContentSlotDao()
-
setCmsContentSlotDao
public void setCmsContentSlotDao(CMSContentSlotDao cmsContentSlotDao)
-
getCmsDataFactory
protected CMSDataFactory getCmsDataFactory()
-
setCmsDataFactory
public void setCmsDataFactory(CMSDataFactory cmsDataFactory)
-
getCatalogVersionService
protected CatalogVersionService getCatalogVersionService()
-
setCatalogVersionService
public void setCatalogVersionService(CatalogVersionService catalogVersionService)
-
getCmsPageService
protected CMSPageService getCmsPageService()
-
setCmsPageService
public void setCmsPageService(CMSPageService cmsPageService)
-
getCmsRestrictionService
public CMSRestrictionService getCmsRestrictionService()
-
setCmsRestrictionService
public void setCmsRestrictionService(CMSRestrictionService cmsRestrictionService)
-
-