Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: org/apache/myfaces/context/servlet/RequestMap.java


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;
19  import java.util.Map;
20  
21  import javax.servlet.ServletRequest;
22  
23  
24  /**
25   * ServletRequest attributes Map.
26   * 
27   * @author Anton Koinov (latest modification by $Author: oros $)
28   * @version $Revision: 278654 $ $Date: 2005-09-04 20:32:35 -0400 (Sun, 04 Sep 2005) $
29   */
30  public class RequestMap extends AbstractAttributeMap
31  {
32      final ServletRequest _servletRequest;
33  
34      RequestMap(ServletRequest servletRequest)
35      {
36          _servletRequest = servletRequest;
37      }
38  
39      protected Object getAttribute(String key)
40      {
41          return _servletRequest.getAttribute(key);
42      }
43  
44      protected void setAttribute(String key, Object value)
45      {
46          _servletRequest.setAttribute(key, value);
47      }
48  
49      protected void removeAttribute(String key)
50      {
51          _servletRequest.removeAttribute(key);
52      }
53  
54      protected Enumeration getAttributeNames()
55      {
56          return _servletRequest.getAttributeNames();
57      }
58  
59      public void putAll(Map t)
60      {
61          throw new UnsupportedOperationException();
62      }
63  
64  
65      public void clear()
66      {
67          throw new UnsupportedOperationException();
68      }    
69  }