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.AbstractThreadSafeAttributeMap;
27
28
29
30
31
32
33
34
35 public class ApplicationMap extends AbstractThreadSafeAttributeMap
36 {
37 final ServletContext _servletContext;
38
39 ApplicationMap(ServletContext servletContext)
40 {
41 _servletContext = servletContext;
42 }
43
44 protected Object getAttribute(String key)
45 {
46 return _servletContext.getAttribute(key);
47 }
48
49 protected void setAttribute(String key, Object value)
50 {
51 _servletContext.setAttribute(key, value);
52 }
53
54 protected void removeAttribute(String key)
55 {
56 _servletContext.removeAttribute(key);
57 }
58
59 protected Enumeration getAttributeNames()
60 {
61 return _servletContext.getAttributeNames();
62 }
63
64
65 public void putAll(Map t)
66 {
67 throw new UnsupportedOperationException();
68 }
69
70
71 public void clear()
72 {
73 throw new UnsupportedOperationException();
74 }
75 }