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  
20  package org.apache.myfaces.tobago.context;
21  
22  import javax.faces.context.FacesContext;
23  import javax.faces.context.ExternalContext;
24  import javax.faces.context.ResponseStream;
25  import javax.faces.context.ResponseWriter;
26  import javax.faces.application.Application;
27  import javax.faces.application.FacesMessage;
28  import javax.faces.render.RenderKit;
29  import javax.faces.component.UIViewRoot;
30  import java.util.Iterator;
31  
32  /**
33   * @deprecated since 2.0.0
34   */
35  @Deprecated
36  public class FacesContextWrapper extends javax.faces.context.FacesContext {
37    private FacesContext context;
38  
39    public FacesContextWrapper(FacesContext context) {
40      this.context = context;
41    }
42  
43    public final FacesContext getContext() {
44      return context;
45    }
46  
47    public Application getApplication() {
48      return context.getApplication();
49    }
50  
51    public Iterator getClientIdsWithMessages() {
52      return context.getClientIdsWithMessages();
53    }
54  
55    public ExternalContext getExternalContext() {
56      return context.getExternalContext();
57    }
58  
59    public FacesMessage.Severity getMaximumSeverity() {
60      return context.getMaximumSeverity();
61    }
62  
63    public Iterator getMessages() {
64      return context.getMessages();
65    }
66  
67    public Iterator getMessages(String clientId) {
68      return context.getMessages(clientId);
69    }
70  
71    public RenderKit getRenderKit() {
72      return context.getRenderKit();
73    }
74  
75    public boolean getRenderResponse() {
76      return context.getRenderResponse();
77    }
78  
79    public boolean getResponseComplete() {
80      return context.getResponseComplete();
81    }
82  
83    public ResponseStream getResponseStream() {
84      return context.getResponseStream();
85    }
86  
87    public void setResponseStream(ResponseStream responseStream) {
88      context.setResponseStream(responseStream);
89    }
90  
91    public ResponseWriter getResponseWriter() {
92      return context.getResponseWriter();
93    }
94  
95    public void setResponseWriter(ResponseWriter responseWriter) {
96      context.setResponseWriter(responseWriter);
97    }
98  
99    public UIViewRoot getViewRoot() {
100     return context.getViewRoot();
101   }
102 
103   public void setViewRoot(UIViewRoot root) {
104     context.setViewRoot(root);
105   }
106 
107   public void addMessage(String clientId, FacesMessage message) {
108     context.addMessage(clientId, message);
109   }
110 
111   public void release() {
112     context.release();
113   }
114 
115   public void renderResponse() {
116     context.renderResponse();
117   }
118 
119   public void responseComplete() {
120     context.responseComplete();
121   }
122 }