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.io.IOException;
24 import java.net.URL;
25 import java.util.Map;
26 import java.util.Set;
27
28 import org.apache.tiles.TilesApplicationContext;
29
30 /***
31 * Delegate for ease of customization.
32 *
33 * @since Tiles 2.1.1
34 * @version $Rev: 950476 $ $Date: 2010-06-02 12:31:43 +0200 (mer, 02 giu 2010) $
35 */
36 public class TilesApplicationContextWrapper implements TilesApplicationContext {
37
38 /***
39 * The original context.
40 */
41 private TilesApplicationContext context;
42
43 /***
44 * Constructor.
45 *
46 * @param context The original context.
47 */
48 public TilesApplicationContextWrapper(TilesApplicationContext context) {
49 this.context = context;
50 }
51
52 /***
53 * Returns the wrapped application context.
54 *
55 * @return The wrapped application context.
56 */
57 public TilesApplicationContext getWrappedApplicationContext() {
58 return context;
59 }
60
61 /*** {@inheritDoc} */
62 public Map<String, Object> getApplicationScope() {
63 return context.getApplicationScope();
64 }
65
66 /*** {@inheritDoc} */
67 public Object getContext() {
68 return context.getContext();
69 }
70
71 /*** {@inheritDoc} */
72 public Map<String, String> getInitParams() {
73 return context.getInitParams();
74 }
75
76 /*** {@inheritDoc} */
77 public URL getResource(String path) throws IOException {
78 return context.getResource(path);
79 }
80
81 /*** {@inheritDoc} */
82 public Set<URL> getResources(String path) throws IOException {
83 return context.getResources(path);
84 }
85 }