Class DefaultPageFlowControlHstSiteMapItemHandler

java.lang.Object
org.hippoecm.hst.core.sitemapitemhandler.AbstractHstSiteMapItemHandler
org.hippoecm.hst.core.sitemapitemhandler.AbstractFilterChainAwareHstSiteMapItemHandler
org.onehippo.forge.pageflow.hst.sitemapitemhandler.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.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected PageFlowControl
    createPageFlowControl(jakarta.servlet.http.HttpServletRequest request)
    Create a PageFlowControl for this request.
    protected PageFlow
    getActivePageFlow(jakarta.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(jakarta.servlet.http.HttpServletRequest request)
    Get a PageFlowControl instance for this request.
    protected org.hippoecm.hst.core.request.SiteMapItemHandlerConfiguration
    Return SiteMapItemHandlerConfiguration.
    void
    init(jakarta.servlet.ServletContext servletContext, org.hippoecm.hst.core.request.SiteMapItemHandlerConfiguration siteMapItemHandlerConfiguration)
     
    protected boolean
    isRequestForPageState(jakarta.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, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.FilterChain filterChain)
     
    protected org.hippoecm.hst.core.request.ResolvedSiteMapItem
    processDefaultResolvedSiteMapItem(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.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 class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

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

    destroy
  • Field Details

  • Constructor Details

    • DefaultPageFlowControlHstSiteMapItemHandler

      public DefaultPageFlowControlHstSiteMapItemHandler()
  • Method Details

    • init

      public void init(jakarta.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, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.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(jakarta.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(jakarta.servlet.http.HttpServletRequest request)
      Create a PageFlowControl for this request.
      Parameters:
      request - servlet request
      Returns:
      a PageFlowControl for this request
    • getActivePageFlow

      protected PageFlow getActivePageFlow(jakarta.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(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.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(jakarta.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