1 16 package javax.faces.context; 17 18 import javax.faces.application.FacesMessage; 19 import java.util.Iterator ; 20 21 25 public abstract class FacesContext 26 { 27 public abstract javax.faces.application.Application getApplication(); 28 29 public abstract Iterator getClientIdsWithMessages(); 30 31 public abstract javax.faces.context.ExternalContext getExternalContext(); 32 33 public abstract FacesMessage.Severity getMaximumSeverity(); 34 35 public abstract Iterator getMessages(); 36 37 public abstract Iterator getMessages(String clientId); 38 39 public abstract javax.faces.render.RenderKit getRenderKit(); 40 41 public abstract boolean getRenderResponse(); 42 43 public abstract boolean getResponseComplete(); 44 45 public abstract javax.faces.context.ResponseStream getResponseStream(); 46 47 public abstract void setResponseStream(javax.faces.context.ResponseStream responseStream); 48 49 public abstract javax.faces.context.ResponseWriter getResponseWriter(); 50 51 public abstract void setResponseWriter(javax.faces.context.ResponseWriter responseWriter); 52 53 public abstract javax.faces.component.UIViewRoot getViewRoot(); 54 55 public abstract void setViewRoot(javax.faces.component.UIViewRoot root); 56 57 public abstract void addMessage(String clientId, 58 javax.faces.application.FacesMessage message); 59 60 public abstract void release(); 61 62 public abstract void renderResponse(); 63 64 public abstract void responseComplete(); 65 66 67 private static ThreadLocal _currentInstance = new ThreadLocal () 68 { 69 protected Object initialValue() 70 { 71 return null; 72 } 73 }; 74 75 public static FacesContext getCurrentInstance() 76 { 77 return (FacesContext)_currentInstance.get(); 78 } 79 80 protected static void setCurrentInstance(javax.faces.context.FacesContext context) 81 { 82 _currentInstance.set(context); 83 84 } 85 } 86 | Popular Tags |