01: package com.tagtraum.jo;
02:
03: import javax.servlet.FilterConfig;
04: import javax.servlet.ServletContext;
05: import java.util.Collections;
06: import java.util.Enumeration;
07: import java.util.HashMap;
08: import java.util.Map;
09:
10: /**
11: *
12: * @author <a href="mailto:hs@tagtraum.com">Hendrik Schreiber</a>
13: * @version 1.1beta1 ($Revision: 1.2 $)
14: */
15: public class JoFilterConfig implements FilterConfig {
16:
17: private Map initParameters;
18: private ServletContext servletContext;
19: private String name;
20:
21: public JoFilterConfig() {
22: this .initParameters = new HashMap();
23: }
24:
25: public void setServletContext(ServletContext servletContext) {
26: this .servletContext = servletContext;
27: }
28:
29: public void setFilterName(String name) {
30: this .name = name;
31: }
32:
33: public String getFilterName() {
34: return name;
35: }
36:
37: public ServletContext getServletContext() {
38: return servletContext;
39: }
40:
41: public String getInitParameter(String name) {
42: return (String) initParameters.get(name);
43: }
44:
45: public Enumeration getInitParameterNames() {
46: return Collections.enumeration(initParameters.keySet());
47: }
48:
49: public String setInitParameter(String aKey, String aValue) {
50: return (String) initParameters.put(aKey, aValue);
51: }
52: }
|