1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.myfaces.context.servlet;
20
21 import java.util.Enumeration;
22 import java.util.Map;
23
24 import javax.servlet.ServletContext;
25
26 import org.apache.myfaces.util.AbstractAttributeMap;
27
28
29
30
31
32
33
34
35 public class InitParameterMap extends AbstractAttributeMap
36 {
37 final ServletContext _servletContext;
38
39 InitParameterMap(ServletContext servletContext)
40 {
41 _servletContext = servletContext;
42 }
43
44 protected Object getAttribute(String key)
45 {
46 return _servletContext.getInitParameter(key);
47 }
48
49 protected void setAttribute(String key, Object value)
50 {
51 throw new UnsupportedOperationException(
52 "Cannot set ServletContext InitParameter");
53 }
54
55 protected void removeAttribute(String key)
56 {
57 throw new UnsupportedOperationException(
58 "Cannot remove ServletContext InitParameter");
59 }
60
61 protected Enumeration getAttributeNames()
62 {
63 return _servletContext.getInitParameterNames();
64 }
65
66 public void putAll(Map t)
67 {
68 throw new UnsupportedOperationException();
69 }
70
71
72 public void clear()
73 {
74 throw new UnsupportedOperationException();
75 }
76 }