Interface CMSPageSlotComponentService
-
- All Superinterfaces:
CMSComponentRenderer<AbstractCMSComponentModel>
- All Known Implementing Classes:
DefaultCMSPageSlotComponentService
public interface CMSPageSlotComponentService extends CMSComponentRenderer<AbstractCMSComponentModel>
Service to support resolving Content Slots and Components in the context of the current page data. Also extends the CMSComponentRenderer interface to support rendering of any AbstractCMSComponentModel.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<AbstractCMSComponentModel>getCMSComponentsForComponent(CmsPageRequestContextData cmsPageRequestContextData, AbstractCMSComponentModel component, boolean evaluateRestrictions, int limit)Get the CMS components for a CMS component.java.util.List<AbstractCMSComponentModel>getCMSComponentsForContentSlot(CmsPageRequestContextData cmsPageRequestContextData, ContentSlotModel contentSlot, boolean evaluateRestrictions, int limit)Get the CMS components in a Content Slot.AbstractCMSComponentModelgetComponentForId(java.lang.String id)Lookup a Component given its ID.ContentSlotModelgetContentSlotForId(java.lang.String id)Lookup a Content Slot given its ID.ContentSlotDatagetContentSlotForPosition(CmsPageRequestContextData cmsPageRequestContextData, java.lang.String position)Lookup the Content Slot data on the current page in the specified position.booleanisComponentVisible(CmsPageRequestContextData cmsPageRequestContextData, AbstractCMSComponentModel component, boolean evaluateRestrictions)Test if the specified Component is visible in the context of the current page.-
Methods inherited from interface de.hybris.platform.acceleratorcms.component.renderer.CMSComponentRenderer
renderComponent
-
-
-
-
Method Detail
-
getContentSlotForId
ContentSlotModel getContentSlotForId(java.lang.String id)
Lookup a Content Slot given its ID.- Parameters:
id- the ID of the content slot- Returns:
- the content slot
-
getComponentForId
AbstractCMSComponentModel getComponentForId(java.lang.String id)
Lookup a Component given its ID.- Parameters:
id- the ID of the component- Returns:
- the component
-
getContentSlotForPosition
ContentSlotData getContentSlotForPosition(CmsPageRequestContextData cmsPageRequestContextData, java.lang.String position)
Lookup the Content Slot data on the current page in the specified position. The current page is looked up in the CmsPageRequestContextData.- Parameters:
cmsPageRequestContextData- The CMS context data for the current requestposition- The position in the page- Returns:
- the content slot data
-
getCMSComponentsForContentSlot
java.util.List<AbstractCMSComponentModel> getCMSComponentsForContentSlot(CmsPageRequestContextData cmsPageRequestContextData, ContentSlotModel contentSlot, boolean evaluateRestrictions, int limit)
Get the CMS components in a Content Slot.- Parameters:
cmsPageRequestContextData- The CMS context data for the current requestcontentSlot- The Content SlotevaluateRestrictions- Flag set to true to indicate that restrictions should be evaluated on the componentslimit- A limit on the number of components to return, set to -1 for unlimited- Returns:
- the list of components in the slot
-
getCMSComponentsForComponent
java.util.List<AbstractCMSComponentModel> getCMSComponentsForComponent(CmsPageRequestContextData cmsPageRequestContextData, AbstractCMSComponentModel component, boolean evaluateRestrictions, int limit)
Get the CMS components for a CMS component. Some CMS components are actually containers of other components. Depending on the specific component the container may be replaced with some of the child components.- Parameters:
cmsPageRequestContextData- The CMS context data for the current requestcomponent- The componentevaluateRestrictions- Flag set to true to indicate that restrictions should be evaluated on the componentslimit- A limit on the number of components to return, set to -1 for unlimited- Returns:
- the list of components
-
isComponentVisible
boolean isComponentVisible(CmsPageRequestContextData cmsPageRequestContextData, AbstractCMSComponentModel component, boolean evaluateRestrictions)
Test if the specified Component is visible in the context of the current page. Evaluates any restrictions applied to the CMS Component. The restrictions are evaluated in the context of the CmsPageRequestContextData.- Parameters:
cmsPageRequestContextData- The CMS context data for the current requestcomponent- The componentevaluateRestrictions- Flag set to true to indicate that restrictions should be evaluated on the component- Returns:
- true if the Component should be shown for this request
-
-