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.StringgetAvailableContentSlotsNames(AbstractPageModel page)Gets the available content slots names and return them as semicolon separated string ("foo; bar; baz").protected CatalogVersionServicegetCatalogVersionService()protected CMSContentSlotDaogetCmsContentSlotDao()protected CMSDataFactorygetCmsDataFactory()protected CMSPageServicegetCmsPageService()CMSRestrictionServicegetCmsRestrictionService()ContentSlotModelgetContentSlotForId(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.StringgetMissingContentSlotsNames(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 relatedAbstractPageModelobjects 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 RestrictionDatapopulate(javax.servlet.http.HttpServletRequest request)Wrapped all information fetched from current HTTP requestvoidsetCatalogVersionService(CatalogVersionService catalogVersionService)voidsetCmsContentSlotDao(CMSContentSlotDao cmsContentSlotDao)voidsetCmsDataFactory(CMSDataFactory cmsDataFactory)voidsetCmsPageService(CMSPageService cmsPageService)voidsetCmsRestrictionService(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:
getAvailableContentSlotsNamesin interfaceCMSContentSlotService- Parameters:
page- theAbstractPageModelobject. *- 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:
getDefinedContentSlotPositionsin 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:
getDefinedContentSlotPositionsin 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:
getMissingContentSlotsNamesin interfaceCMSContentSlotService- Parameters:
page- theAbstractPageModelobject.- Returns:
- the missing content slots names.
-
getPagesForContentSlot
public java.util.Collection<AbstractPageModel> getPagesForContentSlot(ContentSlotModel contentSlot)
Gets the relatedAbstractPageModelobjects for content slot.- Specified by:
getPagesForContentSlotin interfaceCMSContentSlotService- Parameters:
contentSlot- theContentSlotModelobject for which pages will be obtained.- Returns:
- the collection of
AbstractPageModelobjects related toContentSlotModelobject.
-
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:
getSimpleCMSComponentsin 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
RestrictionDataobject
-
getContentSlotForId
public ContentSlotModel getContentSlotForId(java.lang.String id) throws AmbiguousIdentifierException, UnknownIdentifierException
Description copied from interface:CMSContentSlotServiceGets the content slot for given id.- Specified by:
getContentSlotForIdin 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)
-
-