KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > context > portlet > 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.portlet;
17
18 import java.util.Enumeration JavaDoc;
19 import javax.portlet.PortletContext;
20
21 import org.apache.myfaces.context.servlet.AbstractAttributeMap;
22
23
24 /**
25  * PortletContext attributes as a Map.
26  *
27  * @author Stan Silvert (latest modification by $Author: matzew $)
28  * @version $Revision: 1.1 $ $Date: 2005/01/26 17:03:09 $
29  * $Log: ApplicationMap.java,v $
30  * Revision 1.1 2005/01/26 17:03:09 matzew
31  * MYFACES-86. portlet support provided by Stan Silver (JBoss Group)
32  *
33  */

34 public class ApplicationMap extends AbstractAttributeMap
35 {
36     final PortletContext _portletContext;
37
38     ApplicationMap(PortletContext portletContext)
39     {
40         _portletContext = portletContext;
41     }
42
43     protected Object JavaDoc getAttribute(String JavaDoc key)
44     {
45         return _portletContext.getAttribute(key);
46     }
47
48     protected void setAttribute(String JavaDoc key, Object JavaDoc value)
49     {
50         _portletContext.setAttribute(key, value);
51     }
52
53     protected void removeAttribute(String JavaDoc key)
54     {
55         _portletContext.removeAttribute(key);
56     }
57
58     protected Enumeration JavaDoc getAttributeNames()
59     {
60         return _portletContext.getAttributeNames();
61     }
62 }
63
Popular Tags