KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > commons > map > RequestMap


1 /***************************************************************************
2  * Copyright 2001-2003 The eXo Platform SARL All rights reserved. *
3  * Please look at license.txt in info directory for more license detail. *
4  **************************************************************************/

5
6 package org.exoplatform.commons.map;
7
8 import javax.servlet.http.HttpServletRequest JavaDoc ;
9 import javax.portlet.PortletRequest;
10 import java.util.Enumeration JavaDoc;
11
12 /**
13  * @author Ove Ranheim (oranheim@users.sourceforge.net)
14  * @since Nov 6, 2003 6:32:49 PM
15  *
16  */

17 public class RequestMap extends AbstractMap {
18   private HttpServletRequest JavaDoc request_;
19
20   public RequestMap( HttpServletRequest JavaDoc request ) {
21     request_ = request;
22   }
23
24   public RequestMap( PortletRequest request ) {
25     request_ = (HttpServletRequest JavaDoc) request;
26   }
27
28   final protected Object JavaDoc getAttribute( String JavaDoc name ) {
29     return request_.getAttribute( name );
30   }
31
32   final protected void setAttribute( String JavaDoc name, Object JavaDoc value ) {
33     request_.setAttribute( name, value );
34   }
35
36   final protected void removeAttribute( String JavaDoc name ) {
37     request_.removeAttribute( name );
38   }
39
40   final protected Enumeration JavaDoc getAttributeNames() {
41     return request_.getAttributeNames();
42   }
43 }
44
Popular Tags