1 16 package org.springframework.webflow.context.servlet; 17 18 import java.util.Iterator ; 19 20 import javax.servlet.http.HttpServletRequest ; 21 22 import org.springframework.binding.collection.StringKeyedMapAdapter; 23 import org.springframework.webflow.core.collection.CollectionUtils; 24 25 31 public class HttpServletRequestMap extends StringKeyedMapAdapter { 32 33 36 private HttpServletRequest request; 37 38 41 public HttpServletRequestMap(HttpServletRequest request) { 42 this.request = request; 43 } 44 45 protected Object getAttribute(String key) { 46 return request.getAttribute(key); 47 } 48 49 protected void setAttribute(String key, Object value) { 50 request.setAttribute(key, value); 51 } 52 53 protected void removeAttribute(String key) { 54 request.removeAttribute(key); 55 } 56 57 protected Iterator getAttributeNames() { 58 return CollectionUtils.toIterator(request.getAttributeNames()); 59 } 60 } | Popular Tags |