public class DefaultCMSPageSlotComponentService extends java.lang.Object implements CMSPageSlotComponentService
CMSPageSlotComponentService| Constructor and Description |
|---|
DefaultCMSPageSlotComponentService() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addVisibleComponents(CmsPageRequestContextData cmsPageRequestContextData,
boolean evaluateRestrictions,
int limit,
java.util.List<AbstractCMSComponentModel> ret,
java.util.List<AbstractCMSComponentModel> replacementComponents) |
protected boolean |
doesComponentHaveRestrictions(AbstractCMSComponentModel component) |
protected java.util.List<AbstractCMSComponentModel> |
flattenComponentContainerHierarchy(CmsPageRequestContextData cmsPageRequestContextData,
AbstractCMSComponentContainerModel container,
boolean evaluateRestrictions,
int limit) |
protected java.util.List<AbstractCMSComponentModel> |
flattenComponentHierarchy(CmsPageRequestContextData cmsPageRequestContextData,
AbstractCMSComponentModel component,
boolean evaluateRestrictions,
int limit) |
protected CMSComponentContainerRegistry |
getCmsComponentContainerRegistry() |
protected CMSComponentRenderer |
getCmsComponentRenderer() |
protected CMSComponentService |
getCmsComponentService() |
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.
|
protected CMSContentSlotService |
getCmsContentSlotService() |
protected CMSRestrictionService |
getCmsRestrictionService() |
AbstractCMSComponentModel |
getComponentForId(java.lang.String id)
Lookup a Component given its ID.
|
protected java.util.List<AbstractCMSComponentModel> |
getComponentsForContainer(AbstractCMSComponentContainerModel container) |
ContentSlotModel |
getContentSlotForId(java.lang.String id)
Lookup a Content Slot given its ID.
|
ContentSlotData |
getContentSlotForPosition(CmsPageRequestContextData cmsPageRequestContextData,
java.lang.String position)
Lookup the Content Slot data on the current page in the specified position.
|
boolean |
isComponentVisible(CmsPageRequestContextData cmsPageRequestContextData,
AbstractCMSComponentModel component,
boolean evaluateRestrictions)
Checks whether component should be displayed.
Note: Computation takes into account: Checks whether component is visible If component is restricted checks whether we should display it |
void |
renderComponent(PageContext pageContext,
AbstractCMSComponentModel component)
Render a CMS Component into the page at the current location.
|
void |
setCmsComponentContainerRegistry(CMSComponentContainerRegistry cmsComponentContainerRegistry) |
void |
setCmsComponentRenderer(CMSComponentRenderer cmsComponentRenderer) |
void |
setCmsComponentService(CMSComponentService cmsComponentService) |
void |
setCmsContentSlotService(CMSContentSlotService cmsContentSlotService) |
void |
setCmsRestrictionService(CMSRestrictionService cmsRestrictionService) |
protected CMSRestrictionService getCmsRestrictionService()
public void setCmsRestrictionService(CMSRestrictionService cmsRestrictionService)
protected CMSContentSlotService getCmsContentSlotService()
public void setCmsContentSlotService(CMSContentSlotService cmsContentSlotService)
protected CMSComponentService getCmsComponentService()
public void setCmsComponentService(CMSComponentService cmsComponentService)
protected CMSComponentRenderer getCmsComponentRenderer()
public void setCmsComponentRenderer(CMSComponentRenderer cmsComponentRenderer)
protected CMSComponentContainerRegistry getCmsComponentContainerRegistry()
public void setCmsComponentContainerRegistry(CMSComponentContainerRegistry cmsComponentContainerRegistry)
public ContentSlotModel getContentSlotForId(java.lang.String id)
CMSPageSlotComponentServicegetContentSlotForId in interface CMSPageSlotComponentServiceid - the ID of the content slotpublic ContentSlotData getContentSlotForPosition(CmsPageRequestContextData cmsPageRequestContextData, java.lang.String position)
CMSPageSlotComponentServicegetContentSlotForPosition in interface CMSPageSlotComponentServicecmsPageRequestContextData - The CMS context data for the current requestposition - The position in the pagepublic java.util.List<AbstractCMSComponentModel> getCMSComponentsForContentSlot(CmsPageRequestContextData cmsPageRequestContextData, ContentSlotModel contentSlot, boolean evaluateRestrictions, int limit)
CMSPageSlotComponentServicegetCMSComponentsForContentSlot in interface CMSPageSlotComponentServicecmsPageRequestContextData - 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 unlimitedprotected java.util.List<AbstractCMSComponentModel> flattenComponentHierarchy(CmsPageRequestContextData cmsPageRequestContextData, AbstractCMSComponentModel component, boolean evaluateRestrictions, int limit)
protected java.util.List<AbstractCMSComponentModel> flattenComponentContainerHierarchy(CmsPageRequestContextData cmsPageRequestContextData, AbstractCMSComponentContainerModel container, boolean evaluateRestrictions, int limit)
protected void addVisibleComponents(CmsPageRequestContextData cmsPageRequestContextData, boolean evaluateRestrictions, int limit, java.util.List<AbstractCMSComponentModel> ret, java.util.List<AbstractCMSComponentModel> replacementComponents)
protected java.util.List<AbstractCMSComponentModel> getComponentsForContainer(AbstractCMSComponentContainerModel container)
public java.util.List<AbstractCMSComponentModel> getCMSComponentsForComponent(CmsPageRequestContextData cmsPageRequestContextData, AbstractCMSComponentModel component, boolean evaluateRestrictions, int limit)
CMSPageSlotComponentServicegetCMSComponentsForComponent in interface CMSPageSlotComponentServicecmsPageRequestContextData - 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 unlimitedpublic AbstractCMSComponentModel getComponentForId(java.lang.String id)
CMSPageSlotComponentServicegetComponentForId in interface CMSPageSlotComponentServiceid - the ID of the componentpublic boolean isComponentVisible(CmsPageRequestContextData cmsPageRequestContextData, AbstractCMSComponentModel component, boolean evaluateRestrictions)
isComponentVisible in interface CMSPageSlotComponentServicecmsPageRequestContextData - The CMS context data for the current requestcomponent - The componentevaluateRestrictions - Flag set to true to indicate that restrictions should be evaluated on the componentprotected boolean doesComponentHaveRestrictions(AbstractCMSComponentModel component)
public void renderComponent(PageContext pageContext,
AbstractCMSComponentModel component)
throws ServletException,
java.io.IOException
CMSComponentRendererrenderComponent in interface CMSComponentRenderer<AbstractCMSComponentModel>pageContext - The page context to render intocomponent - The component to renderServletExceptionjava.io.IOExceptionCopyright © 2018 SAP SE. All Rights Reserved.