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; |
22 | |
|
23 | |
import java.io.IOException; |
24 | |
|
25 | |
import org.apache.tiles.request.ApplicationContext; |
26 | |
import org.apache.tiles.request.Request; |
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
public class TilesContainerWrapper implements TilesContainer { |
34 | |
|
35 | |
|
36 | |
|
37 | |
|
38 | |
protected TilesContainer container; |
39 | |
|
40 | |
|
41 | |
|
42 | |
|
43 | |
|
44 | |
|
45 | 15 | public TilesContainerWrapper(TilesContainer container) { |
46 | 15 | this.container = container; |
47 | 15 | if (container == null) { |
48 | 1 | throw new NullPointerException("The wrapped container must be not null"); |
49 | |
} |
50 | 14 | } |
51 | |
|
52 | |
|
53 | |
|
54 | |
|
55 | |
|
56 | |
|
57 | |
public TilesContainer getWrappedContainer() { |
58 | 1 | return container; |
59 | |
} |
60 | |
|
61 | |
@Override |
62 | |
public void endContext(Request request) { |
63 | 1 | container.endContext(request); |
64 | 1 | } |
65 | |
|
66 | |
@Override |
67 | |
public Object evaluate(Attribute attribute, Request request) { |
68 | 1 | return container.evaluate(attribute, request); |
69 | |
} |
70 | |
|
71 | |
@Override |
72 | |
public ApplicationContext getApplicationContext() { |
73 | 1 | return container.getApplicationContext(); |
74 | |
} |
75 | |
|
76 | |
@Override |
77 | |
public AttributeContext getAttributeContext(Request request) { |
78 | 1 | return container.getAttributeContext(request); |
79 | |
} |
80 | |
|
81 | |
@Override |
82 | |
public Definition getDefinition(String definitionName, Request request) { |
83 | 1 | return container.getDefinition(definitionName, request); |
84 | |
} |
85 | |
|
86 | |
@Override |
87 | |
public boolean isValidDefinition(String definition, Request request) { |
88 | 1 | return container.isValidDefinition(definition, request); |
89 | |
} |
90 | |
|
91 | |
@Override |
92 | |
public void prepare(String preparer, Request request) { |
93 | 1 | container.prepare(preparer, request); |
94 | 1 | } |
95 | |
|
96 | |
@Override |
97 | |
public void render(String definition, Request request) { |
98 | 1 | container.render(definition, request); |
99 | 1 | } |
100 | |
|
101 | |
@Override |
102 | |
public void render(Definition definition, Request request) { |
103 | 1 | container.render(definition, request); |
104 | 1 | } |
105 | |
|
106 | |
@Override |
107 | |
public void render(Attribute attribute, Request request) throws IOException { |
108 | 1 | container.render(attribute, request); |
109 | 1 | } |
110 | |
|
111 | |
@Override |
112 | |
public void renderContext(Request request) { |
113 | 1 | container.renderContext(request); |
114 | 1 | } |
115 | |
|
116 | |
@Override |
117 | |
public AttributeContext startContext(Request request) { |
118 | 1 | return container.startContext(request); |
119 | |
} |
120 | |
} |