1 package com.icesoft.faces.webapp.http.servlet; 2 3 import com.icesoft.faces.context.AbstractAttributeMap; 4 5 import javax.servlet.http.HttpSession ; 6 import java.util.Enumeration ; 7 8 public class ServletSessionMap extends AbstractAttributeMap { 9 private final HttpSession httpSession; 10 11 public ServletSessionMap(HttpSession httpSession) { 12 this.httpSession = httpSession; 13 } 14 15 18 protected Object getAttribute(String key) { 19 return httpSession.getAttribute(key); 20 } 21 22 25 protected void setAttribute(String key, Object value) { 26 httpSession.setAttribute(key, value); 27 } 28 29 32 protected void removeAttribute(String key) { 33 httpSession.removeAttribute(key); 34 } 35 36 39 protected Enumeration getAttributeNames() { 40 return httpSession.getAttributeNames(); 41 } 42 43 } 44 | Popular Tags |