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