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 Details

    • getContentSlotForId

      ContentSlotModel getContentSlotForId(String id)
      Lookup a Content Slot given its ID.
      Parameters:
      id - the ID of the content slot
      Returns:
      the content slot
    • getComponentForId

      AbstractCMSComponentModel getComponentForId(String id)
      Lookup a Component given its ID.
      Parameters:
      id - the ID of the component
      Returns:
      the component
    • getContentSlotForPosition

      ContentSlotData getContentSlotForPosition(CmsPageRequestContextData cmsPageRequestContextData, 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 request
      position - The position in the page
      Returns:
      the content slot data
    • getCMSComponentsForContentSlot

      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 request
      contentSlot - The Content Slot
      evaluateRestrictions - Flag set to true to indicate that restrictions should be evaluated on the components
      limit - A limit on the number of components to return, set to -1 for unlimited
      Returns:
      the list of components in the slot
    • getCMSComponentsForComponent

      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 request
      component - The component
      evaluateRestrictions - Flag set to true to indicate that restrictions should be evaluated on the components
      limit - 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 request
      component - The component
      evaluateRestrictions - 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