Class 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.OncePerRequestFilter
    Filter 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.String AJAX_REQUEST_HEADER_NAME  
      static java.lang.String ORIGINAL_REFERER  
      • Fields inherited from class org.springframework.web.filter.OncePerRequestFilter

        ALREADY_FILTERED_SUFFIX
      • Fields inherited from class org.springframework.web.filter.GenericFilterBean

        logger
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void doFilterInternal​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain)  
      protected BrowseHistory getBrowseHistory()  
      protected org.springframework.util.PathMatcher getPathMatcher()  
      protected java.util.Set<java.lang.String> getRefererExcludeUrlSet()  
      protected StoreSessionFacade getStoreSessionFacade()  
      protected void initDefaults​(javax.servlet.http.HttpServletRequest request)  
      protected boolean isGetMethod​(javax.servlet.http.HttpServletRequest httpRequest)  
      protected boolean isRequestPathExcluded​(javax.servlet.http.HttpServletRequest request)  
      protected boolean isRequestSecure​(javax.servlet.http.HttpServletRequest httpRequest)  
      protected boolean isSessionInitialized​(javax.servlet.http.HttpSession session)  
      protected boolean isSessionNotInitialized​(javax.servlet.http.HttpSession session, java.lang.String queryString)  
      protected void markSessionInitialized​(javax.servlet.http.HttpSession session)  
      void setBrowseHistory​(BrowseHistory browseHistory)  
      void setPathMatcher​(org.springframework.util.PathMatcher pathMatcher)  
      void setRefererExcludeUrlSet​(java.util.Set<java.lang.String> refererExcludeUrlSet)  
      void setStoreSessionFacade​(StoreSessionFacade storeSessionFacade)  
      • Methods inherited from class org.springframework.web.filter.OncePerRequestFilter

        doFilter, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilter, shouldNotFilterAsyncDispatch, shouldNotFilterErrorDispatch
      • Methods inherited from class org.springframework.web.filter.GenericFilterBean

        addRequiredProperty, afterPropertiesSet, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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
    • Constructor Detail

      • StorefrontFilter

        public StorefrontFilter()
    • 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:
        doFilterInternal in class org.springframework.web.filter.OncePerRequestFilter
        Throws:
        java.io.IOException
        javax.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)
      • 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)