KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > context > servlet > ApplicationMap


1 /*
2  * Copyright 2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.myfaces.context.servlet;
17
18 import java.util.Enumeration JavaDoc;
19
20 import javax.servlet.ServletContext JavaDoc;
21
22
23 /**
24  * ServletContext attributes as a Map.
25  *
26  * @author Anton Koinov (latest modification by $Author: matze $)
27  * @version $Revision: 1.10 $ $Date: 2004/10/13 11:51:00 $
28  *
29  * $Log: ApplicationMap.java,v $
30  * Revision 1.10 2004/10/13 11:51:00 matze
31  * renamed packages to org.apache
32  *
33  * Revision 1.9 2004/07/01 22:05:04 mwessendorf
34  * ASF switch
35  *
36  * Revision 1.8 2004/03/30 07:43:33 dave0000
37  * add $Log
38  *
39  */

40 public class ApplicationMap extends AbstractAttributeMap
41 {
42     final ServletContext JavaDoc _servletContext;
43
44     ApplicationMap(ServletContext JavaDoc servletContext)
45     {
46         _servletContext = servletContext;
47     }
48
49     protected Object JavaDoc getAttribute(String JavaDoc key)
50     {
51         return _servletContext.getAttribute(key);
52     }
53
54     protected void setAttribute(String JavaDoc key, Object JavaDoc value)
55     {
56         _servletContext.setAttribute(key, value);
57     }
58
59     protected void removeAttribute(String JavaDoc key)
60     {
61         _servletContext.removeAttribute(key);
62     }
63
64     protected Enumeration JavaDoc getAttributeNames()
65     {
66         return _servletContext.getAttributeNames();
67     }
68 }
69
Popular Tags