Class DefaultPageFlowControlHstSiteMapItemHandler

  • All Implemented Interfaces:
    org.hippoecm.hst.core.sitemapitemhandler.FilterChainAwareHstSiteMapItemHandler, org.hippoecm.hst.core.sitemapitemhandler.HstSiteMapItemHandler

    public class DefaultPageFlowControlHstSiteMapItemHandler
    extends org.hippoecm.hst.core.sitemapitemhandler.AbstractFilterChainAwareHstSiteMapItemHandler
    Default generic HstSiteMapItemHandler implementation to integrate with Page Flow module.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected PageFlowControl createPageFlowControl​(javax.servlet.http.HttpServletRequest request)
      Create a PageFlowControl for this request.
      protected PageFlow getActivePageFlow​(javax.servlet.http.HttpServletRequest request, PageFlowControl flowControl)
      Return an active PageFlow instance for this request.
      protected <T> T getConfigurationProperty​(String name, org.hippoecm.hst.core.request.ResolvedSiteMapItem resolvedSiteMapItem, Class<T> type, T defaultValue)
      Get the configuration property value on the resolvedSiteMapItem.
      protected PageFlowControl getPageFlowControl​(javax.servlet.http.HttpServletRequest request)
      Get a PageFlowControl instance for this request.
      protected org.hippoecm.hst.core.request.SiteMapItemHandlerConfiguration getSiteMapItemHandlerConfiguration()
      Return SiteMapItemHandlerConfiguration.
      void init​(javax.servlet.ServletContext servletContext, org.hippoecm.hst.core.request.SiteMapItemHandlerConfiguration siteMapItemHandlerConfiguration)  
      protected boolean isRequestForPageState​(javax.servlet.http.HttpServletRequest request, PageState pageState)
      Return true if the current request is for the specific pageState by comparing the pathInfo of the request with the path of the pageState.
      org.hippoecm.hst.core.request.ResolvedSiteMapItem process​(org.hippoecm.hst.core.request.ResolvedSiteMapItem resolvedSiteMapItem, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain)  
      protected org.hippoecm.hst.core.request.ResolvedSiteMapItem processDefaultResolvedSiteMapItem​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain, org.hippoecm.hst.core.request.ResolvedSiteMapItem resolvedSiteMapItem)
      Process the current resolved sitemap item by the default behavior, without any custom behavior from Page Flow Module.
      • Methods inherited from class org.hippoecm.hst.core.sitemapitemhandler.AbstractFilterChainAwareHstSiteMapItemHandler

        process
      • Methods inherited from class org.hippoecm.hst.core.sitemapitemhandler.AbstractHstSiteMapItemHandler

        destroy
      • Methods inherited from interface org.hippoecm.hst.core.sitemapitemhandler.HstSiteMapItemHandler

        destroy
    • Constructor Detail

      • DefaultPageFlowControlHstSiteMapItemHandler

        public DefaultPageFlowControlHstSiteMapItemHandler()
    • Method Detail

      • init

        public void init​(javax.servlet.ServletContext servletContext,
                         org.hippoecm.hst.core.request.SiteMapItemHandlerConfiguration siteMapItemHandlerConfiguration)
                  throws org.hippoecm.hst.core.sitemapitemhandler.HstSiteMapItemHandlerException
        Specified by:
        init in interface org.hippoecm.hst.core.sitemapitemhandler.HstSiteMapItemHandler
        Overrides:
        init in class org.hippoecm.hst.core.sitemapitemhandler.AbstractHstSiteMapItemHandler
        Throws:
        org.hippoecm.hst.core.sitemapitemhandler.HstSiteMapItemHandlerException
      • process

        public org.hippoecm.hst.core.request.ResolvedSiteMapItem process​(org.hippoecm.hst.core.request.ResolvedSiteMapItem resolvedSiteMapItem,
                                                                         javax.servlet.http.HttpServletRequest request,
                                                                         javax.servlet.http.HttpServletResponse response,
                                                                         javax.servlet.FilterChain filterChain)
                                                                  throws org.hippoecm.hst.core.sitemapitemhandler.HstSiteMapItemHandlerException
        Specified by:
        process in interface org.hippoecm.hst.core.sitemapitemhandler.FilterChainAwareHstSiteMapItemHandler
        Specified by:
        process in class org.hippoecm.hst.core.sitemapitemhandler.AbstractFilterChainAwareHstSiteMapItemHandler
        Throws:
        org.hippoecm.hst.core.sitemapitemhandler.HstSiteMapItemHandlerException
      • getSiteMapItemHandlerConfiguration

        protected org.hippoecm.hst.core.request.SiteMapItemHandlerConfiguration getSiteMapItemHandlerConfiguration()
        Return SiteMapItemHandlerConfiguration.
        Returns:
        SiteMapItemHandlerConfiguration
      • getPageFlowControl

        protected PageFlowControl getPageFlowControl​(javax.servlet.http.HttpServletRequest request)
        Get a PageFlowControl instance for this request.
        Parameters:
        request - servlet request
        Returns:
        a PageFlowControl instance for this request
      • createPageFlowControl

        protected PageFlowControl createPageFlowControl​(javax.servlet.http.HttpServletRequest request)
        Create a PageFlowControl for this request.
        Parameters:
        request - servlet request
        Returns:
        a PageFlowControl for this request
      • getActivePageFlow

        protected PageFlow getActivePageFlow​(javax.servlet.http.HttpServletRequest request,
                                             PageFlowControl flowControl)
        Return an active PageFlow instance for this request.
        Parameters:
        request - servlet request
        flowControl - PageFlowControl instance
        Returns:
        an active PageFlow instance for this request
      • processDefaultResolvedSiteMapItem

        protected org.hippoecm.hst.core.request.ResolvedSiteMapItem processDefaultResolvedSiteMapItem​(javax.servlet.http.HttpServletRequest request,
                                                                                                      javax.servlet.http.HttpServletResponse response,
                                                                                                      javax.servlet.FilterChain filterChain,
                                                                                                      org.hippoecm.hst.core.request.ResolvedSiteMapItem resolvedSiteMapItem)
        Process the current resolved sitemap item by the default behavior, without any custom behavior from Page Flow Module.
        Parameters:
        request - servlet request
        response - servlet response
        filterChain - servlet filter chain
        resolvedSiteMapItem - resolved sitemap item
        Returns:
        resolved sitemap item, the same meaning as HstSiteMapItemHandler.process(ResolvedSiteMapItem, HttpServletRequest, HttpServletResponse).
      • getConfigurationProperty

        protected <T> T getConfigurationProperty​(String name,
                                                 org.hippoecm.hst.core.request.ResolvedSiteMapItem resolvedSiteMapItem,
                                                 Class<T> type,
                                                 T defaultValue)
        Get the configuration property value on the resolvedSiteMapItem.
        Parameters:
        name - configuration property name
        resolvedSiteMapItem - resolved sitemap item
        type - expected configuration value type
        defaultValue - default value
        Returns:
        the configuration property value on the resolvedSiteMapItem
      • isRequestForPageState

        protected boolean isRequestForPageState​(javax.servlet.http.HttpServletRequest request,
                                                PageState pageState)
        Return true if the current request is for the specific pageState by comparing the pathInfo of the request with the path of the pageState.
        Parameters:
        request - servlet request
        pageState - page state
        Returns:
        true if the current request is for the specific pageState by comparing the pathInfo of the request with the path of the pageState