Class StorefrontFilter
- java.lang.Object
-
- org.springframework.web.filter.GenericFilterBean
-
- org.springframework.web.filter.OncePerRequestFilter
-
- de.hybris.platform.yacceleratorstorefront.filters.StorefrontFilter
-
- All Implemented Interfaces:
javax.servlet.Filter,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean,org.springframework.context.EnvironmentAware,org.springframework.core.env.EnvironmentCapable,org.springframework.web.context.ServletContextAware
public class StorefrontFilter extends org.springframework.web.filter.OncePerRequestFilterFilter that initializes the session for the yacceleratorstorefront. This is a spring configured filter that is executed by the PlatformFilterChain.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringAJAX_REQUEST_HEADER_NAMEstatic java.lang.StringORIGINAL_REFERER
-
Constructor Summary
Constructors Constructor Description StorefrontFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoFilterInternal(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain)protected BrowseHistorygetBrowseHistory()protected org.springframework.util.PathMatchergetPathMatcher()protected java.util.Set<java.lang.String>getRefererExcludeUrlSet()protected StoreSessionFacadegetStoreSessionFacade()protected voidinitDefaults(javax.servlet.http.HttpServletRequest request)protected booleanisGetMethod(javax.servlet.http.HttpServletRequest httpRequest)protected booleanisRequestPathExcluded(javax.servlet.http.HttpServletRequest request)protected booleanisRequestSecure(javax.servlet.http.HttpServletRequest httpRequest)protected booleanisSessionInitialized(javax.servlet.http.HttpSession session)protected booleanisSessionNotInitialized(javax.servlet.http.HttpSession session, java.lang.String queryString)protected voidmarkSessionInitialized(javax.servlet.http.HttpSession session)voidsetBrowseHistory(BrowseHistory browseHistory)voidsetPathMatcher(org.springframework.util.PathMatcher pathMatcher)voidsetRefererExcludeUrlSet(java.util.Set<java.lang.String> refererExcludeUrlSet)voidsetStoreSessionFacade(StoreSessionFacade storeSessionFacade)-
Methods inherited from class org.springframework.web.filter.OncePerRequestFilter
doFilter, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilter, shouldNotFilterAsyncDispatch, shouldNotFilterErrorDispatch
-
-
-
-
Field Detail
-
AJAX_REQUEST_HEADER_NAME
public static final java.lang.String AJAX_REQUEST_HEADER_NAME
- See Also:
- Constant Field Values
-
ORIGINAL_REFERER
public static final java.lang.String ORIGINAL_REFERER
- See Also:
- Constant Field Values
-
-
Method Detail
-
doFilterInternal
public void doFilterInternal(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain) throws java.io.IOException, javax.servlet.ServletException- Specified by:
doFilterInternalin classorg.springframework.web.filter.OncePerRequestFilter- Throws:
java.io.IOExceptionjavax.servlet.ServletException
-
isGetMethod
protected boolean isGetMethod(javax.servlet.http.HttpServletRequest httpRequest)
-
isRequestSecure
protected boolean isRequestSecure(javax.servlet.http.HttpServletRequest httpRequest)
-
isSessionNotInitialized
protected boolean isSessionNotInitialized(javax.servlet.http.HttpSession session, java.lang.String queryString)
-
setStoreSessionFacade
public void setStoreSessionFacade(StoreSessionFacade storeSessionFacade)
-
setBrowseHistory
public void setBrowseHistory(BrowseHistory browseHistory)
-
initDefaults
protected void initDefaults(javax.servlet.http.HttpServletRequest request)
-
getStoreSessionFacade
protected StoreSessionFacade getStoreSessionFacade()
-
getBrowseHistory
protected BrowseHistory getBrowseHistory()
-
isSessionInitialized
protected boolean isSessionInitialized(javax.servlet.http.HttpSession session)
-
markSessionInitialized
protected void markSessionInitialized(javax.servlet.http.HttpSession session)
-
isRequestPathExcluded
protected boolean isRequestPathExcluded(javax.servlet.http.HttpServletRequest request)
-
getRefererExcludeUrlSet
protected java.util.Set<java.lang.String> getRefererExcludeUrlSet()
-
setRefererExcludeUrlSet
public void setRefererExcludeUrlSet(java.util.Set<java.lang.String> refererExcludeUrlSet)
-
getPathMatcher
protected org.springframework.util.PathMatcher getPathMatcher()
-
setPathMatcher
public void setPathMatcher(org.springframework.util.PathMatcher pathMatcher)
-
-