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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected PageFlowControl
createPageFlowControl
(jakarta.servlet.http.HttpServletRequest request) Create aPageFlowControl
for this request.protected PageFlow
getActivePageFlow
(jakarta.servlet.http.HttpServletRequest request, PageFlowControl flowControl) Return an activePageFlow
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 theresolvedSiteMapItem
.protected PageFlowControl
getPageFlowControl
(jakarta.servlet.http.HttpServletRequest request) Get aPageFlowControl
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 currentrequest
is for the specificpageState
by comparing thepathInfo
of therequest
with thepath
of thepageState
.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
-
PARAM_ENABLED
- See Also:
-
PARAM_AUTO_REDIRECTION_ENABLED
- See Also:
-
-
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 interfaceorg.hippoecm.hst.core.sitemapitemhandler.HstSiteMapItemHandler
- Overrides:
init
in classorg.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 interfaceorg.hippoecm.hst.core.sitemapitemhandler.FilterChainAwareHstSiteMapItemHandler
- Specified by:
process
in classorg.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
Get aPageFlowControl
instance for this request.- Parameters:
request
- servlet request- Returns:
- a
PageFlowControl
instance for this request
-
createPageFlowControl
Create aPageFlowControl
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 activePageFlow
instance for this request.- Parameters:
request
- servlet requestflowControl
-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 requestresponse
- servlet responsefilterChain
- servlet filter chainresolvedSiteMapItem
- 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 theresolvedSiteMapItem
.- Parameters:
name
- configuration property nameresolvedSiteMapItem
- resolved sitemap itemtype
- expected configuration value typedefaultValue
- 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 currentrequest
is for the specificpageState
by comparing thepathInfo
of therequest
with thepath
of thepageState
.- Parameters:
request
- servlet requestpageState
- page state- Returns:
- true if the current
request
is for the specificpageState
by comparing thepathInfo
of therequest
with thepath
of thepageState
-