KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > context > portlet > RequestMap


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

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