Source code: com/obinary/cms/admin/Filters/BaseEncodeFilter.java
1 /**
2 *
3 * Magnolia and its source-code is licensed under the LGPL.
4 * You may copy, adapt, and redistribute this file for commercial or non-commercial use.
5 * When copying, adapting, or redistributing this document in keeping with the guidelines above,
6 * you are required to provide proper attribution to obinary.
7 * If you reproduce or distribute the document without making any substantive modifications to its content,
8 * please use the following attribution line:
9 *
10 * Copyright 1993-2003 obinary Ltd. (http://www.obinary.com) All rights reserved.
11 *
12 * */
13
14
15
16
17
18 package com.obinary.cms.admin.Filters;
19
20
21
22 import javax.servlet.*;
23 import javax.servlet.ServletRequest;
24 import javax.servlet.ServletResponse;
25 import java.io.IOException;
26
27
28 /**
29 * User: sameercharles
30 * Date: June 15, 2003
31 * Time: 10:00:14 PM
32 * @author Sameer Charles
33 * @version 1.0
34 */
35
36
37 public abstract class BaseEncodeFilter implements Filter {
38
39
40 private FilterConfig filterConfig;
41
42
43 protected BaseEncodeFilter() {
44 }
45
46
47
48 /**
49 *
50 */
51 public void init(FilterConfig filterConfig) {
52 setFilterConfig(filterConfig);
53 }
54
55
56
57 /**
58 *
59 */
60 public void destroy () {
61 this.filterConfig = null;
62 }
63
64
65
66 /**
67 * <p>All filtering tasks which are common to filters extending BaseEncodeFilter</p>
68 *
69 * @param req , Servlet request as given by servlet container
70 * @param res , Servlet response as given by servlet container
71 * @param filterChain , FilterChain object available to the developer
72 */
73 public void doFilter(ServletRequest req, ServletResponse res, FilterChain filterChain) throws IOException, javax.servlet.ServletException {
74 filterChain.doFilter(req,res);
75 }
76
77
78
79 /**
80 * @param filterConfig , defined in web.xml
81 */
82 public void setFilterConfig(FilterConfig filterConfig) {
83 this.filterConfig = filterConfig;
84 }
85
86
87
88 /**
89 * @return FilterConfig object
90 */
91 public FilterConfig getFilterConfig() {
92 return this.filterConfig;
93 }
94
95
96
97
98
99 }