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