Class ConfigAwareEtagFilter

java.lang.Object
org.springframework.web.filter.GenericFilterBean
org.springframework.web.filter.OncePerRequestFilter
org.springframework.web.filter.ShallowEtagHeaderFilter
org.craftercms.engine.servlet.filter.ConfigAwareEtagFilter
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 ConfigAwareEtagFilter extends org.springframework.web.filter.ShallowEtagHeaderFilter
Extension of ShallowEtagHeaderFilter that supports custom configurations
Since:
3.1.10
Author:
joseross
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
    Indicates if the filter is enabled
    protected String[]
    The list of url patterns to that should be processed
    protected org.springframework.util.PathMatcher
    The PathMatcher used to compare urls

    Fields inherited from class org.springframework.web.filter.OncePerRequestFilter

    ALREADY_FILTERED_SUFFIX

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

    logger
  • Constructor Summary

    Constructors
    Constructor
    Description
    ConfigAwareEtagFilter(boolean enabled, String[] includedUrls)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
    shouldNotFilter(javax.servlet.http.HttpServletRequest request)
     

    Methods inherited from class org.springframework.web.filter.ShallowEtagHeaderFilter

    disableContentCaching, doFilterInternal, generateETagHeaderValue, isEligibleForEtag, isWriteWeakETag, setWriteWeakETag, shouldNotFilterAsyncDispatch

    Methods inherited from class org.springframework.web.filter.OncePerRequestFilter

    doFilter, doFilterNestedErrorDispatch, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, 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 Details

    • enabled

      protected boolean enabled
      Indicates if the filter is enabled
    • includedUrls

      protected String[] includedUrls
      The list of url patterns to that should be processed
    • pathMatcher

      protected org.springframework.util.PathMatcher pathMatcher
      The PathMatcher used to compare urls
  • Constructor Details

    • ConfigAwareEtagFilter

      @ConstructorProperties({"enabled","includedUrls"}) public ConfigAwareEtagFilter(boolean enabled, String[] includedUrls)
  • Method Details

    • shouldNotFilter

      protected boolean shouldNotFilter(javax.servlet.http.HttpServletRequest request) throws javax.servlet.ServletException
      Overrides:
      shouldNotFilter in class org.springframework.web.filter.OncePerRequestFilter
      Throws:
      javax.servlet.ServletException