Interface CMSContentSlotService
- All Known Implementing Classes:
DefaultCMSContentSlotService
public interface CMSContentSlotService
The Interface CMSContentSlotService provides methods for managing content slots.
- Spring Bean ID:
- cmsContentSlotService
-
Method Summary
Modifier and TypeMethodDescriptionGets the available content slots names and return them as semicolon separated string ("foo; bar; baz").Gets the content slot for given id.Gets the defined content slot positions.getDefinedContentSlotPositions(PageTemplateModel pageTemplate) Gets the defined content slot positions.Gets the missing content slots names and return them as semicolon separated string ("foo; bar; baz").getPagesForContentSlot(ContentSlotModel contentSlot) Gets the relatedAbstractPageModelobjects for content slot.getSimpleCMSComponents(ContentSlotModel contentSlot, boolean previewEnabled, javax.servlet.http.HttpServletRequest httRequest) Retrieves a list of components that are valid for particular content slotdefault booleanisSharedSlot(ContentSlotModel contentSlot) Check a content slot is shared or not.
-
Method Details
-
getContentSlotForId
ContentSlotModel getContentSlotForId(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
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:
-
getAvailableContentSlotsNames
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
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
Gets the defined content slot positions.- Parameters:
pageTemplate- the page template- Returns:
- the defined content slot positions
-
getDefinedContentSlotPositions
Gets the defined content slot positions.- Parameters:
page- the page- Returns:
- the defined content slot positions
-
getPagesForContentSlot
Gets the relatedAbstractPageModelobjects for content slot.- Parameters:
contentSlot- theContentSlotModelobject for which pages will be obtained.- Returns:
- the collection of
AbstractPageModelobjects related toContentSlotModelobject.
-