KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > context > servlet > 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.servlet;
17
18 import java.util.Enumeration JavaDoc;
19
20 import javax.servlet.ServletRequest JavaDoc;
21
22
23 /**
24  * ServletRequest attributes Map.
25  *
26  * @author Anton Koinov (latest modification by $Author: matze $)
27  * @version $Revision: 1.9 $ $Date: 2004/10/13 11:51:00 $
28  */

29 public class RequestMap extends AbstractAttributeMap
30 {
31     final ServletRequest JavaDoc _servletRequest;
32
33     RequestMap(ServletRequest JavaDoc servletRequest)
34     {
35         _servletRequest = servletRequest;
36     }
37
38     protected Object JavaDoc getAttribute(String JavaDoc key)
39     {
40         return _servletRequest.getAttribute(key);
41     }
42
43     protected void setAttribute(String JavaDoc key, Object JavaDoc value)
44     {
45         _servletRequest.setAttribute(key, value);
46     }
47
48     protected void removeAttribute(String JavaDoc key)
49     {
50         _servletRequest.removeAttribute(key);
51     }
52
53     protected Enumeration JavaDoc getAttributeNames()
54     {
55         return _servletRequest.getAttributeNames();
56     }
57 }
58
Popular Tags