Interface CMSContentSlotService
-
- All Known Implementing Classes:
DefaultCMSContentSlotService
public interface CMSContentSlotServiceThe Interface CMSContentSlotService provides methods for managing content slots.- Spring Bean ID:
- cmsContentSlotService
-
-
Method Summary
All Methods Instance Methods Abstract 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").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 httRequest)Retrieves a list of components that are valid for particular content slot
-
-
-
Method Detail
-
getContentSlotForId
ContentSlotModel getContentSlotForId(java.lang.String id) throws AmbiguousIdentifierException, UnknownIdentifierException
Gets the content slot for given id.- 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
-
getSimpleCMSComponents
java.util.List<SimpleCMSComponentModel> getSimpleCMSComponents(ContentSlotModel contentSlot, boolean previewEnabled, javax.servlet.http.HttpServletRequest httRequest)
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- Parameters:
contentSlot- given content slotpreviewEnabled- flag that indicates whether preview is enabledhttRequest- 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)
-
getAvailableContentSlotsNames
java.lang.String getAvailableContentSlotsNames(AbstractPageModel page)
Gets the available content slots names and return them as semicolon separated string ("foo; bar; baz").- Parameters:
page- theAbstractPageModelobject. *- Returns:
- the available content slots names as semicolon separated string.
-
getMissingContentSlotsNames
java.lang.String getMissingContentSlotsNames(AbstractPageModel page)
Gets the missing content slots names and return them as semicolon separated string ("foo; bar; baz").- Parameters:
page- theAbstractPageModelobject.- Returns:
- the missing content slots names.
-
getDefinedContentSlotPositions
java.util.List<java.lang.String> getDefinedContentSlotPositions(PageTemplateModel pageTemplate)
Gets the defined content slot positions.- Parameters:
pageTemplate- the page template- Returns:
- the defined content slot positions
-
getDefinedContentSlotPositions
java.util.List<java.lang.String> getDefinedContentSlotPositions(AbstractPageModel page)
Gets the defined content slot positions.- Parameters:
page- the page- Returns:
- the defined content slot positions
-
getPagesForContentSlot
java.util.Collection<AbstractPageModel> getPagesForContentSlot(ContentSlotModel contentSlot)
Gets the relatedAbstractPageModelobjects for content slot.- Parameters:
contentSlot- theContentSlotModelobject for which pages will be obtained.- Returns:
- the collection of
AbstractPageModelobjects related toContentSlotModelobject.
-
-