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
27 /***
28 * Delegate for ease of customization.
29 *
30 * @since Tiles 2.0
31 * @version $Rev: 527536 $ $Date: 2007-04-11 17:44:51 +0200 (Wed, 11 Apr 2007) $
32 */
33 public class TilesRequestContextWrapper implements TilesRequestContext {
34
35 /***
36 * The wrapper request context object.
37 */
38 private TilesRequestContext context;
39
40
41 /***
42 * Constructor.
43 *
44 * @param context The request context to wrap.
45 */
46 public TilesRequestContextWrapper(TilesRequestContext context) {
47 this.context = context;
48 }
49
50 /*** {@inheritDoc} */
51 public Map<String, String> getHeader() {
52 return context.getHeader();
53 }
54
55 /*** {@inheritDoc} */
56 public Map<String, String[]> getHeaderValues() {
57 return context.getHeaderValues();
58 }
59
60 /*** {@inheritDoc} */
61 public Map<String, Object> getRequestScope() {
62 return context.getRequestScope();
63 }
64
65 /*** {@inheritDoc} */
66 public Map<String, Object> getSessionScope() {
67 return context.getSessionScope();
68 }
69
70 /*** {@inheritDoc} */
71 public void dispatch(String path) throws IOException {
72 context.dispatch(path);
73 }
74
75 /*** {@inheritDoc} */
76 public void include(String path) throws IOException {
77 context.include(path);
78 }
79
80 /*** {@inheritDoc} */
81 public Map<String, String> getParam() {
82 return context.getParam();
83 }
84
85 /*** {@inheritDoc} */
86 public Map<String, String[]> getParamValues() {
87 return context.getParamValues();
88 }
89
90 /*** {@inheritDoc} */
91 public Locale getRequestLocale() {
92 return context.getRequestLocale();
93 }
94
95 /*** {@inheritDoc} */
96 public boolean isUserInRole(String role) {
97 return context.isUserInRole(role);
98 }
99
100
101 /*** {@inheritDoc} */
102 public Object getResponse() {
103 return context.getResponse();
104 }
105
106 /*** {@inheritDoc} */
107 public Object getRequest() {
108 return context.getRequest();
109 }
110 }