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
Modifier and TypeFieldDescriptionprotected boolean
Indicates if the filter is enabledprotected String[]
The list of url patterns to that should be processedprotected org.springframework.util.PathMatcher
ThePathMatcher
used to compare urlsFields inherited from class org.springframework.web.filter.OncePerRequestFilter
ALREADY_FILTERED_SUFFIX
Fields inherited from class org.springframework.web.filter.GenericFilterBean
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected 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
-
Field Details
-
enabled
protected boolean enabledIndicates if the filter is enabled -
includedUrls
The list of url patterns to that should be processed -
pathMatcher
protected org.springframework.util.PathMatcher pathMatcherThePathMatcher
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 classorg.springframework.web.filter.OncePerRequestFilter
- Throws:
javax.servlet.ServletException
-