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 genericHstSiteMapItemHandler
implementation to integrate with Page Flow module.
-
-
Field Summary
Fields Modifier and Type Field Description static String
PARAM_AUTO_REDIRECTION_ENABLED
static String
PARAM_ENABLED
-
Constructor Summary
Constructors Constructor Description DefaultPageFlowControlHstSiteMapItemHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PageFlowControl
createPageFlowControl(javax.servlet.http.HttpServletRequest request)
Create aPageFlowControl
for this request.protected PageFlow
getActivePageFlow(javax.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(javax.servlet.http.HttpServletRequest request)
Get aPageFlowControl
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 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, 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
-
-
-
-
Field Detail
-
PARAM_ENABLED
public static final String PARAM_ENABLED
- See Also:
- Constant Field Values
-
PARAM_AUTO_REDIRECTION_ENABLED
public static final String PARAM_AUTO_REDIRECTION_ENABLED
- See Also:
- Constant Field Values
-
-
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 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, 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 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
protected PageFlowControl getPageFlowControl(javax.servlet.http.HttpServletRequest request)
Get aPageFlowControl
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 aPageFlowControl
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 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(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 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(javax.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
-
-