This project has retired. For details please refer to its
Attic page.
TilesRequestContextWrapper xref
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.apache.tiles.context;
22
23 import java.util.Map;
24 import java.util.Locale;
25 import java.io.IOException;
26 import java.io.OutputStream;
27 import java.io.PrintWriter;
28 import java.io.Writer;
29
30 import org.apache.tiles.TilesApplicationContext;
31
32 /***
33 * Delegate for ease of customization.
34 *
35 * @since Tiles 2.0
36 * @version $Rev: 769961 $ $Date: 2009-04-30 00:07:34 +0200 (gio, 30 apr 2009) $
37 */
38 public class TilesRequestContextWrapper implements TilesRequestContext {
39
40 /***
41 * The wrapper request context object.
42 */
43 private TilesRequestContext context;
44
45
46 /***
47 * Constructor.
48 *
49 * @param context The request context to wrap.
50 */
51 public TilesRequestContextWrapper(TilesRequestContext context) {
52 this.context = context;
53 }
54
55 /***
56 * Returns the wrapped Tiles request.
57 *
58 * @return The wrapped Tiles request.
59 * @since 2.1.1
60 */
61 public TilesRequestContext getWrappedRequest() {
62 return context;
63 }
64
65 /*** {@inheritDoc} */
66 public Map<String, String> getHeader() {
67 return context.getHeader();
68 }
69
70 /*** {@inheritDoc} */
71 public Map<String, String[]> getHeaderValues() {
72 return context.getHeaderValues();
73 }
74
75 /*** {@inheritDoc} */
76 public Map<String, Object> getRequestScope() {
77 return context.getRequestScope();
78 }
79
80 /*** {@inheritDoc} */
81 public Map<String, Object> getSessionScope() {
82 return context.getSessionScope();
83 }
84
85 /*** {@inheritDoc} */
86 public TilesApplicationContext getApplicationContext() {
87 return context.getApplicationContext();
88 }
89
90 /*** {@inheritDoc} */
91 public void dispatch(String path) throws IOException {
92 context.dispatch(path);
93 }
94
95 /*** {@inheritDoc} */
96 public void include(String path) throws IOException {
97 context.include(path);
98 }
99
100 /*** {@inheritDoc} */
101 public OutputStream getOutputStream() throws IOException {
102 return context.getOutputStream();
103 }
104
105 /*** {@inheritDoc} */
106 public Writer getWriter() throws IOException {
107 return context.getWriter();
108 }
109
110 /*** {@inheritDoc} */
111 public PrintWriter getPrintWriter() throws IOException {
112 return context.getPrintWriter();
113 }
114
115 /*** {@inheritDoc} */
116 public boolean isResponseCommitted() {
117 return context.isResponseCommitted();
118 }
119
120 /*** {@inheritDoc} */
121 public void setContentType(String contentType) {
122 context.setContentType(contentType);
123 }
124
125 /*** {@inheritDoc} */
126 public Map<String, String> getParam() {
127 return context.getParam();
128 }
129
130 /*** {@inheritDoc} */
131 public Map<String, String[]> getParamValues() {
132 return context.getParamValues();
133 }
134
135 /*** {@inheritDoc} */
136 public Locale getRequestLocale() {
137 return context.getRequestLocale();
138 }
139
140 /*** {@inheritDoc} */
141 public boolean isUserInRole(String role) {
142 return context.isUserInRole(role);
143 }
144
145 /*** {@inheritDoc} */
146 public Object[] getRequestObjects() {
147 return context.getRequestObjects();
148 }
149
150 /*** {@inheritDoc} */
151 @Deprecated
152 public Object getResponse() {
153 return context.getResponse();
154 }
155
156 /*** {@inheritDoc} */
157 @Deprecated
158 public Object getRequest() {
159 return context.getRequest();
160 }
161 }