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
    Constructor
    Description
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    applyCachePreventionHeaders(javax.servlet.http.HttpServletResponse response)
    Deprecated.
    Setting cache prevention headers to responses.
    protected boolean
    Deprecated.
    Checks for a match with the filtering pattern and the Content Type/ URL.
    void
    Deprecated.
     
    abstract void
    doFilter(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse, javax.servlet.FilterChain filterChain)
    Deprecated.
    void
    init(javax.servlet.FilterConfig filterConfig)
    Deprecated.
     
    protected void
    initHeaders(javax.servlet.FilterConfig filterConfig)
    Deprecated.
    This method will check for any headers defined in the web.xml.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AbstractCachePreventionFilter

      public AbstractCachePreventionFilter()
      Deprecated.
  • Method Details

    • init

      public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException
      Deprecated.
      Specified by:
      init in interface javax.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

      protected boolean canApplyCachePreventionHeaders(String stringToBeMatched)
      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:
      doFilter in interface javax.servlet.Filter
      Throws:
      IOException
      javax.servlet.ServletException
    • destroy

      public void destroy()
      Deprecated.
      Specified by:
      destroy in interface javax.servlet.Filter