KickJava   Java API By Example, From Geeks To Geeks.

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


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  * PortletRequest multi-value parameters as Map.
24  *
25  * @author Stan Silvert (latest modification by $Author: matzew $)
26  * @version $Revision: 1.1 $ $Date: 2005/01/26 17:03:09 $
27  * $Log: RequestParameterValuesMap.java,v $
28  * Revision 1.1 2005/01/26 17:03:09 matzew
29  * MYFACES-86. portlet support provided by Stan Silver (JBoss Group)
30  *
31  */

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