KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > icesoft > faces > webapp > http > servlet > ServletApplicationMap


1 package com.icesoft.faces.webapp.http.servlet;
2
3 import com.icesoft.faces.context.AbstractAttributeMap;
4
5 import javax.servlet.ServletContext JavaDoc;
6 import java.util.Enumeration JavaDoc;
7
8 public class ServletApplicationMap extends AbstractAttributeMap {
9
10     final ServletContext JavaDoc servletContext;
11
12     public ServletApplicationMap(ServletContext JavaDoc servletContext) {
13         this.servletContext = servletContext;
14     }
15
16     /*
17       * @see com.icesoft.faces.context.AbstractAttributeMap#getAttribute(java.lang.String)
18       */

19     protected Object JavaDoc getAttribute(String JavaDoc key) {
20         return servletContext.getAttribute(key);
21     }
22
23     /*
24       * @see com.icesoft.faces.context.AbstractAttributeMap#setAttribute(java.lang.String, java.lang.Object)
25       */

26     protected void setAttribute(String JavaDoc key, Object JavaDoc value) {
27         servletContext.setAttribute(key, value);
28     }
29
30     /*
31       * @see com.icesoft.faces.context.AbstractAttributeMap#removeAttribute(java.lang.String)
32       */

33     protected void removeAttribute(String JavaDoc key) {
34         servletContext.removeAttribute(key);
35     }
36
37     /*
38       * @see com.icesoft.faces.context.AbstractAttributeMap#getAttributeNames()
39       */

40     protected Enumeration JavaDoc getAttributeNames() {
41         return servletContext.getAttributeNames();
42     }
43
44 }
45
Popular Tags