View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package javax.faces.context;
20  
21  import java.util.Iterator;
22  import java.util.List;
23  import java.util.Map;
24  
25  import javax.el.ELContext;
26  import javax.faces.FacesWrapper;
27  import javax.faces.application.Application;
28  import javax.faces.application.FacesMessage;
29  import javax.faces.application.ProjectStage;
30  import javax.faces.application.FacesMessage.Severity;
31  import javax.faces.component.UIViewRoot;
32  import javax.faces.event.PhaseId;
33  import javax.faces.render.RenderKit;
34  
35  /**
36   * @since 2.0
37   */
38  public abstract class FacesContextWrapper extends FacesContext implements FacesWrapper<FacesContext>
39  {
40      @Override
41      public void addMessage(String clientId, FacesMessage message)
42      {
43          getWrapped().addMessage(clientId, message);
44      }
45  
46      @Override
47      public Application getApplication()
48      {
49          return getWrapped().getApplication();
50      }
51  
52      @Override
53      public Map<Object, Object> getAttributes()
54      {
55          return getWrapped().getAttributes();
56      }
57  
58      @Override
59      public Iterator<String> getClientIdsWithMessages()
60      {
61          return getWrapped().getClientIdsWithMessages();
62      }
63  
64      @Override
65      public PhaseId getCurrentPhaseId()
66      {
67          return getWrapped().getCurrentPhaseId();
68      }
69  
70      @Override
71      public ELContext getELContext()
72      {
73          return getWrapped().getELContext();
74      }
75  
76      @Override
77      public ExceptionHandler getExceptionHandler()
78      {
79          return getWrapped().getExceptionHandler();
80      }
81  
82      @Override
83      public ExternalContext getExternalContext()
84      {
85          return getWrapped().getExternalContext();
86      }
87  
88      @Override
89      public Severity getMaximumSeverity()
90      {
91          return getWrapped().getMaximumSeverity();
92      }
93  
94      @Override
95      public List<FacesMessage> getMessageList()
96      {
97          return getWrapped().getMessageList();
98      }
99  
100     @Override
101     public List<FacesMessage> getMessageList(String clientId)
102     {
103         return getWrapped().getMessageList(clientId);
104     }
105 
106     @Override
107     public Iterator<FacesMessage> getMessages()
108     {
109         return getWrapped().getMessages();
110     }
111 
112     @Override
113     public Iterator<FacesMessage> getMessages(String clientId)
114     {
115         return getWrapped().getMessages(clientId);
116     }
117 
118     @Override
119     public PartialViewContext getPartialViewContext()
120     {
121         return getWrapped().getPartialViewContext();
122     }
123 
124     @Override
125     public RenderKit getRenderKit()
126     {
127         return getWrapped().getRenderKit();
128     }
129 
130     @Override
131     public boolean getRenderResponse()
132     {
133         return getWrapped().getRenderResponse();
134     }
135 
136     @Override
137     public boolean getResponseComplete()
138     {
139         return getWrapped().getResponseComplete();
140     }
141 
142     @Override
143     public ResponseStream getResponseStream()
144     {
145         return getWrapped().getResponseStream();
146     }
147 
148     @Override
149     public ResponseWriter getResponseWriter()
150     {
151         return getWrapped().getResponseWriter();
152     }
153 
154     @Override
155     public boolean isValidationFailed()
156     {
157         return getWrapped().isValidationFailed();
158     }
159 
160     @Override
161     public UIViewRoot getViewRoot()
162     {
163         return getWrapped().getViewRoot();
164     }
165 
166     public abstract FacesContext getWrapped();
167 
168     @Override
169     public boolean isPostback()
170     {
171         return getWrapped().isPostback();
172     }
173 
174     @Override
175     public boolean isProcessingEvents()
176     {
177         return getWrapped().isProcessingEvents();
178     }
179 
180     @Override
181     public void release()
182     {
183         getWrapped().release();
184     }
185 
186     @Override
187     public void renderResponse()
188     {
189         getWrapped().renderResponse();
190     }
191 
192     @Override
193     public void responseComplete()
194     {
195         getWrapped().responseComplete();
196     }
197 
198     @Override
199     public void setCurrentPhaseId(PhaseId currentPhaseId)
200     {
201         getWrapped().setCurrentPhaseId(currentPhaseId);
202     }
203 
204     @Override
205     public void setExceptionHandler(ExceptionHandler exceptionHandler)
206     {
207         getWrapped().setExceptionHandler(exceptionHandler);
208     }
209 
210     @Override
211     public void setProcessingEvents(boolean processingEvents)
212     {
213         getWrapped().setProcessingEvents(processingEvents);
214     }
215 
216     @Override
217     public void setResponseStream(ResponseStream responseStream)
218     {
219         getWrapped().setResponseStream(responseStream);
220     }
221 
222     @Override
223     public void setResponseWriter(ResponseWriter responseWriter)
224     {
225         getWrapped().setResponseWriter(responseWriter);
226     }
227 
228     @Override
229     public void setViewRoot(UIViewRoot root)
230     {
231         getWrapped().setViewRoot(root);
232     }
233 
234     @Override
235     public void validationFailed()
236     {
237         getWrapped().validationFailed();
238     }
239 
240     @Override
241     public boolean isProjectStage(ProjectStage stage)
242     {
243         return getWrapped().isProjectStage(stage);
244     }
245 
246     @Override
247     public boolean isReleased()
248     {
249         return getWrapped().isReleased();
250     }
251 
252     @Override
253     public char getNamingContainerSeparatorChar()
254     {
255         return getWrapped().getNamingContainerSeparatorChar();
256     }
257 
258     @Override
259     public void setResourceLibraryContracts(List<String> contracts)
260     {
261         getWrapped().setResourceLibraryContracts(contracts);
262     }
263 
264     @Override
265     public List<String> getResourceLibraryContracts()
266     {
267         return getWrapped().getResourceLibraryContracts();
268     }
269 
270 }