1 16 package org.apache.myfaces.context; 17 18 import javax.faces.application.Application; 19 import javax.faces.application.FacesMessage; 20 import javax.faces.application.FacesMessage.Severity; 21 import javax.faces.component.UIViewRoot; 22 import javax.faces.context.ExternalContext; 23 import javax.faces.context.FacesContext; 24 import javax.faces.context.ResponseStream; 25 import javax.faces.context.ResponseWriter; 26 import javax.faces.render.RenderKit; 27 import java.util.Iterator ; 28 29 30 36 public class FacesContextWrapper 37 extends FacesContext 38 { 39 41 private FacesContext _facesContext; 42 43 45 public FacesContextWrapper(FacesContext facesContext) 46 { 47 _facesContext = facesContext; 48 } 49 50 52 public Application getApplication() 53 { 54 return _facesContext.getApplication(); 55 } 56 57 public Iterator getClientIdsWithMessages() 58 { 59 return _facesContext.getClientIdsWithMessages(); 60 } 61 62 public ExternalContext getExternalContext() 63 { 64 return _facesContext.getExternalContext(); 65 } 66 67 public Severity getMaximumSeverity() 68 { 69 return _facesContext.getMaximumSeverity(); 70 } 71 72 public Iterator getMessages() 73 { 74 return _facesContext.getMessages(); 75 } 76 77 public Iterator getMessages(String clientId) 78 { 79 return _facesContext.getMessages(clientId); 80 } 81 82 public RenderKit getRenderKit() 83 { 84 return _facesContext.getRenderKit(); 85 } 86 87 public boolean getRenderResponse() 88 { 89 return _facesContext.getRenderResponse(); 90 } 91 92 public boolean getResponseComplete() 93 { 94 return _facesContext.getResponseComplete(); 95 } 96 97 public void setResponseStream(ResponseStream responsestream) 98 { 99 _facesContext.setResponseStream(responsestream); 100 } 101 102 public ResponseStream getResponseStream() 103 { 104 return _facesContext.getResponseStream(); 105 } 106 107 public void setResponseWriter(ResponseWriter responsewriter) 108 { 109 _facesContext.setResponseWriter(responsewriter); 110 } 111 112 public ResponseWriter getResponseWriter() 113 { 114 return _facesContext.getResponseWriter(); 115 } 116 117 public void setViewRoot(UIViewRoot viewRoot) 118 { 119 _facesContext.setViewRoot(viewRoot); 120 } 121 122 public UIViewRoot getViewRoot() 123 { 124 return _facesContext.getViewRoot(); 125 } 126 127 public void addMessage(String clientId, FacesMessage message) 128 { 129 _facesContext.addMessage(clientId, message); 130 } 131 132 public void release() 133 { 134 _facesContext.release(); 135 } 136 137 public void renderResponse() 138 { 139 _facesContext.renderResponse(); 140 } 141 142 public void responseComplete() 143 { 144 _facesContext.responseComplete(); 145 } 146 } 147 | Popular Tags |