1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.acegisecurity;
17
18 import java.util.Enumeration;
19 import java.util.HashMap;
20 import java.util.Map;
21
22 import javax.servlet.FilterConfig;
23 import javax.servlet.ServletContext;
24
25
26 /***
27 * DOCUMENT ME!
28 *
29 * @author Ben Alex
30 * @version $Id: MockFilterConfig.java,v 1.2 2005/11/17 00:55:47 benalex Exp $
31 */
32 public class MockFilterConfig implements FilterConfig {
33
34
35 private Map map = new HashMap();
36
37
38
39 public String getFilterName() {
40 throw new UnsupportedOperationException("mock method not implemented");
41 }
42
43 public String getInitParameter(String arg0) {
44 Object result = map.get(arg0);
45
46 if (result != null) {
47 return (String) result;
48 } else {
49 return null;
50 }
51 }
52
53 public Enumeration getInitParameterNames() {
54 throw new UnsupportedOperationException("mock method not implemented");
55 }
56
57 public void setInitParmeter(String parameter, String value) {
58 map.put(parameter, value);
59 }
60
61 public ServletContext getServletContext() {
62 throw new UnsupportedOperationException("mock method not implemented");
63 }
64 }