Interface CMSPageSlotComponentService

    • 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 request
        position - 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 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

        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 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