Package org.wso2.carbon.ui.filters.cache
Class AbstractCachePreventionFilter
java.lang.Object
org.wso2.carbon.ui.filters.cache.AbstractCachePreventionFilter
- All Implemented Interfaces:
javax.servlet.Filter
- Direct Known Subclasses:
ContentTypeBasedCachePreventionFilter,URLBasedCachePreventionFilter
@Deprecated
public abstract class AbstractCachePreventionFilter
extends Object
implements javax.servlet.Filter
Deprecated.
This class is moved to org.wso2.carbon.tomcat.ext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapplyCachePreventionHeaders(javax.servlet.http.HttpServletResponse response) Deprecated.Setting cache prevention headers to responses.protected booleancanApplyCachePreventionHeaders(String stringToBeMatched) Deprecated.Checks for a match with the filtering pattern and the Content Type/ URL.voiddestroy()Deprecated.abstract voiddoFilter(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse, javax.servlet.FilterChain filterChain) Deprecated.voidinit(javax.servlet.FilterConfig filterConfig) Deprecated.protected voidinitHeaders(javax.servlet.FilterConfig filterConfig) Deprecated.This method will check for any headers defined in the web.xml.protected voidinitPatternsAndAction(javax.servlet.FilterConfig filterConfig) Deprecated.Reading the filtering pattern and the action to be performed against the pattern from the web.xml.
-
Constructor Details
-
AbstractCachePreventionFilter
public AbstractCachePreventionFilter()Deprecated.
-
-
Method Details
-
init
public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException Deprecated.- Specified by:
initin interfacejavax.servlet.Filter- Throws:
javax.servlet.ServletException
-
initHeaders
protected void initHeaders(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException Deprecated.This method will check for any headers defined in the web.xml. If any headers are found in the web.xml, those headers with the corresponding values will be set to prevent caching. If any headers aren't found in the web.xml, the default headers with values will be set for cache prevention.- Parameters:
filterConfig- Configurations specific to this filter in the web.xml- Throws:
javax.servlet.ServletException
-
initPatternsAndAction
protected void initPatternsAndAction(javax.servlet.FilterConfig filterConfig) Deprecated.Reading the filtering pattern and the action to be performed against the pattern from the web.xml. The pattern is a regex that could define content types or URLs. Multiple patterns can be defined in each new line.- Parameters:
filterConfig- Configurations specific to this filter in the web.xml
-
canApplyCachePreventionHeaders
Deprecated.Checks for a match with the filtering pattern and the Content Type/ URL.- Parameters:
stringToBeMatched- Requested URL or the Content Type in the response- Returns:
- true for either to set headers for a match, or skip setting headers to a match
-
applyCachePreventionHeaders
protected void applyCachePreventionHeaders(javax.servlet.http.HttpServletResponse response) Deprecated.Setting cache prevention headers to responses.- Parameters:
response- HTTP Servlet Response
-
doFilter
public abstract void doFilter(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse, javax.servlet.FilterChain filterChain) throws IOException, javax.servlet.ServletException Deprecated.- Specified by:
doFilterin interfacejavax.servlet.Filter- Throws:
IOExceptionjavax.servlet.ServletException
-
destroy
public void destroy()Deprecated.- Specified by:
destroyin interfacejavax.servlet.Filter
-