1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package org.apache.tiles.definition;
23
24 import java.io.IOException;
25 import java.util.Locale;
26 import java.util.Map;
27
28 import org.apache.tiles.context.TilesRequestContext;
29
30 /***
31 * Creates a TilesApplicationContext that contains only a Locale.
32 *
33 * @version $Rev: 527536 $ $Date: 2007-04-11 17:44:51 +0200 (Wed, 11 Apr 2007) $
34 */
35 public class MockOnlyLocaleTilesContext implements TilesRequestContext {
36
37 /***
38 * The locale object.
39 */
40 private Locale locale;
41
42 /*** Creates a new instance of MockOnlyLocaleTilesContext.
43 *
44 * @param locale The locale object to use.
45 */
46 public MockOnlyLocaleTilesContext(Locale locale) {
47 this.locale = locale;
48 }
49
50 /***
51 * Returns the locale specified in the constructor.
52 *
53 * @return The locale of the request.
54 * @see org.apache.tiles.context.TilesRequestContext#getRequestLocale()
55 */
56 public Locale getRequestLocale() {
57 return locale;
58 }
59
60
61
62
63
64 /*** {@inheritDoc} */
65 public void dispatch(String path) throws IOException {
66 }
67
68 /*** {@inheritDoc} */
69 public Map<String, String> getHeader() {
70 return null;
71 }
72
73 /*** {@inheritDoc} */
74 public Map<String, String[]> getHeaderValues() {
75 return null;
76 }
77
78 /*** {@inheritDoc} */
79 public Map<String, String> getParam() {
80 return null;
81 }
82
83 /*** {@inheritDoc} */
84 public Map<String, String[]> getParamValues() {
85 return null;
86 }
87
88 /*** {@inheritDoc} */
89 public Map<String, Object> getRequestScope() {
90 return null;
91 }
92
93 /*** {@inheritDoc} */
94 public Map<String, Object> getSessionScope() {
95 return null;
96 }
97
98 /*** {@inheritDoc} */
99 public void include(String path) throws IOException {
100 }
101
102 /*** {@inheritDoc} */
103 public boolean isUserInRole(String role) {
104 return false;
105 }
106
107 /*** {@inheritDoc} */
108 public Object getRequest() {
109 return null;
110 }
111
112 /*** {@inheritDoc} */
113 public Object getResponse() {
114 return null;
115 }
116 }