1 5 6 package org.exoplatform.commons.map; 7 8 import javax.servlet.http.HttpServletRequest ; 9 import javax.portlet.PortletRequest; 10 import java.util.Enumeration ; 11 12 17 public class RequestMap extends AbstractMap { 18 private HttpServletRequest request_; 19 20 public RequestMap( HttpServletRequest request ) { 21 request_ = request; 22 } 23 24 public RequestMap( PortletRequest request ) { 25 request_ = (HttpServletRequest ) request; 26 } 27 28 final protected Object getAttribute( String name ) { 29 return request_.getAttribute( name ); 30 } 31 32 final protected void setAttribute( String name, Object value ) { 33 request_.setAttribute( name, value ); 34 } 35 36 final protected void removeAttribute( String name ) { 37 request_.removeAttribute( name ); 38 } 39 40 final protected Enumeration getAttributeNames() { 41 return request_.getAttributeNames(); 42 } 43 } 44 | Popular Tags |