1 16 package org.apache.myfaces.context.servlet; 17 18 import java.util.Enumeration ; 19 20 import javax.servlet.ServletContext ; 21 22 23 29 public class InitParameterMap extends AbstractAttributeMap 30 { 31 final ServletContext _servletContext; 32 33 InitParameterMap(ServletContext servletContext) 34 { 35 _servletContext = servletContext; 36 } 37 38 protected Object getAttribute(String key) 39 { 40 return _servletContext.getInitParameter(key); 41 } 42 43 protected void setAttribute(String key, Object value) 44 { 45 throw new UnsupportedOperationException ( 46 "Cannot set ServletContext InitParameter"); 47 } 48 49 protected void removeAttribute(String key) 50 { 51 throw new UnsupportedOperationException ( 52 "Cannot remove ServletContext InitParameter"); 53 } 54 55 protected Enumeration getAttributeNames() 56 { 57 return _servletContext.getInitParameterNames(); 58 } 59 } 60 | Popular Tags |