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