public class DefaultCMSContentSlotService extends AbstractCMSService implements CMSContentSlotService
CMSContentSlotServiceAbstractService.SerializableDTO| Modifier and Type | Field and Description |
|---|---|
protected CatalogService |
catalogService |
protected CMSContentSlotDao |
cmsContentSlotDao
Deprecated.
Implement the CMSContentSlotDao as own property
|
protected CMSDataFactory |
cmsDataFactory
Deprecated.
Implement the CMSDataFactory as own property
|
protected CMSRestrictionService |
cmsRestrictionService |
CURRENTCATALOGVERSION, CURRENTSITEmodelService, sessionService, txManagertenant| Constructor and Description |
|---|
DefaultCMSContentSlotService() |
| Modifier and Type | Method and Description |
|---|---|
String |
getAvailableContentSlotsNames(AbstractPageModel page)
Gets the available content slots names and return them as semicolon separated string ("foo; bar; baz").
|
CMSRestrictionService |
getCmsRestrictionService() |
ContentSlotModel |
getContentSlot(String id)
Deprecated.
use
getContentSlotForId(String) instead. |
ContentSlotModel |
getContentSlotForId(String id)
Gets the content slot for given id.
|
List<String> |
getDefinedContentSlotPositions(AbstractPageModel page)
Gets the defined content slot positions.
|
List<String> |
getDefinedContentSlotPositions(PageTemplateModel pageTemplate)
Gets the defined content slot positions.
|
String |
getMissingContentSlotsNames(AbstractPageModel page)
Gets the missing content slots names and return them as semicolon separated string ("foo; bar; baz").
|
Collection<AbstractPageModel> |
getPagesForContentSlot(ContentSlotModel contentSlot)
Gets the related
AbstractPageModel objects for content slot. |
List<SimpleCMSComponentModel> |
getSimpleCMSComponents(ContentSlotModel contentSlot,
boolean previewEnabled,
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.
|
protected RestrictionData |
populate(HttpServletRequest request)
Wrapped all information fetched from current HTTP request
|
void |
setCatalogService(CatalogService catalogService) |
void |
setCmsContentSlotDao(CMSContentSlotDao cmsContentSlotDao) |
void |
setCmsDataFactory(CMSDataFactory cmsDataFactory) |
void |
setCmsPageService(CMSPageService cmsPageService) |
void |
setCmsRestrictionService(CMSRestrictionService cmsRestrictionService) |
getBaseSiteService, getCurrentCatalogVersion, getCurrentSite, getSearchRestrictionService, getUserService, setBaseSiteService, setSearchRestrictionService, setUserServicegetModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerafterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, setTenantScope, writeReplace@Deprecated protected CMSContentSlotDao cmsContentSlotDao
@Deprecated protected CMSDataFactory cmsDataFactory
protected CatalogService catalogService
protected CMSRestrictionService cmsRestrictionService
public String getAvailableContentSlotsNames(AbstractPageModel page)
getAvailableContentSlotsNames in interface CMSContentSlotServicepage - the AbstractPageModel object. *public CMSRestrictionService getCmsRestrictionService()
@Deprecated public ContentSlotModel getContentSlot(String id) throws CMSItemNotFoundException
getContentSlotForId(String) instead.getContentSlot in interface CMSContentSlotServiceid - the id of content slot to findCMSItemNotFoundException - thrown when item was not foundpublic List<String> getDefinedContentSlotPositions(AbstractPageModel page)
getDefinedContentSlotPositions in interface CMSContentSlotServicepage - the pagepublic List<String> getDefinedContentSlotPositions(PageTemplateModel pageTemplate)
getDefinedContentSlotPositions in interface CMSContentSlotServicepageTemplate - the page templatepublic String getMissingContentSlotsNames(AbstractPageModel page)
getMissingContentSlotsNames in interface CMSContentSlotServicepage - the AbstractPageModel object.public Collection<AbstractPageModel> getPagesForContentSlot(ContentSlotModel contentSlot)
AbstractPageModel objects for content slot.getPagesForContentSlot in interface CMSContentSlotServicecontentSlot - the ContentSlotModel object for which pages will be obtained.AbstractPageModel objects related to ContentSlotModel object.public List<SimpleCMSComponentModel> getSimpleCMSComponents(ContentSlotModel contentSlot, boolean previewEnabled, HttpServletRequest httpRequest)
getSimpleCMSComponents in interface CMSContentSlotServicecontentSlot - given content slotpreviewEnabled - flag that indicates whether preview is enabledhttpRequest - current HTTP requestCMSRestrictionService.evaluateCMSComponent(de.hybris.platform.cms2.model.contents.components.AbstractCMSComponentModel,
de.hybris.platform.cms2.servicelayer.data.RestrictionData)public void setCatalogService(CatalogService catalogService)
public void setCmsContentSlotDao(CMSContentSlotDao cmsContentSlotDao)
public void setCmsDataFactory(CMSDataFactory cmsDataFactory)
public void setCmsPageService(CMSPageService cmsPageService)
public void setCmsRestrictionService(CMSRestrictionService cmsRestrictionService)
protected RestrictionData populate(HttpServletRequest request)
request - current HTTP requestRestrictionData objectpublic ContentSlotModel getContentSlotForId(String id) throws AmbiguousIdentifierException, UnknownIdentifierException
CMSContentSlotServicegetContentSlotForId in interface CMSContentSlotServiceid - the id of content slot to findAmbiguousIdentifierException - thrown when more than one object has been found.UnknownIdentifierException - thrown when no object has been foundCopyright © 2017 SAP SE. All Rights Reserved.