1 package com.atlassian.core.filters;
2
3 import javax.servlet.Filter;
4 import javax.servlet.FilterConfig;
5 import javax.servlet.ServletException;
6
7 /**
8 * This class contains two deprecated methods to make filters compatible with old web application servers that are using
9 * the old servlet spec
10 *
11 * @deprecated since 4.0 use {@link AbstractHttpFilter} instead, which also does some casting for you.
12 * @see AbstractHttpFilter
13 */
14 public abstract class AbstractFilter implements Filter
15 {
16 /** @deprecated Not needed in final version of Servlet 2.3 API - replaced by init(). */
17 // NOTE: Applications don't work in Orion 1.5.2 without this method
18 public FilterConfig getFilterConfig()
19 {
20 return null;
21 }
22
23 /** @deprecated Not needed in final version of Servlet 2.3 API - replaced by init(). */
24 // NOTE: Applications don't work with Orion 1.5.2 without this method
25 public void setFilterConfig(FilterConfig filterConfig)
26 {
27 try
28 {
29 init(filterConfig);
30 }
31 catch (ServletException e)
32 {
33 //do nothing
34 }
35 }
36
37 public void init(FilterConfig filterConfig) throws ServletException
38 {
39 // Implemented for convenience
40 }
41
42 public void destroy()
43 {
44 // Implemented for convenience
45 }
46 }