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