1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.velocity.tools.generic.app;
18
19 import java.io.IOException;
20 import java.io.InputStream;
21 import java.io.Reader;
22 import java.io.Writer;
23 import java.util.Properties;
24
25 import org.apache.commons.collections.ExtendedProperties;
26 import org.apache.velocity.Template;
27 import org.apache.velocity.app.Velocity;
28 import org.apache.velocity.app.VelocityEngine;
29 import org.apache.velocity.context.Context;
30 import org.apache.velocity.exception.MethodInvocationException;
31 import org.apache.velocity.exception.ParseErrorException;
32 import org.apache.velocity.exception.ResourceNotFoundException;
33 import org.apache.velocity.runtime.configuration.Configuration;
34
35 /***
36 * @author <a href="mailto:shinobu@ieee.org">Shinobu Kawai</a>
37 * @version $Id: $
38 */
39 public class MonostateVelocityEngine extends VelocityEngine
40 {
41
42 /***
43 *
44 */
45 public MonostateVelocityEngine()
46 {
47 }
48 /***
49 * @param arg0
50 * @throws java.lang.Exception
51 */
52 public MonostateVelocityEngine(String arg0) throws Exception
53 {
54 Velocity.init(arg0);
55 }
56 /***
57 * @param arg0
58 * @throws java.lang.Exception
59 */
60 public MonostateVelocityEngine(Properties arg0) throws Exception
61 {
62 Velocity.init(arg0);
63 }
64
65
66
67 public void addProperty(String arg0, Object arg1)
68 {
69 Velocity.addProperty(arg0, arg1);
70 }
71
72
73
74 public void clearProperty(String arg0)
75 {
76 Velocity.clearProperty(arg0);
77 }
78
79
80
81 public void debug(Object arg0)
82 {
83 Velocity.debug(arg0);
84 }
85
86
87
88 public void error(Object arg0)
89 {
90 Velocity.error(arg0);
91 }
92
93
94
95 public boolean evaluate(Context arg0, Writer arg1, String arg2,
96 InputStream arg3) throws ParseErrorException,
97 MethodInvocationException, ResourceNotFoundException, IOException
98 {
99 return Velocity.evaluate(arg0, arg1, arg2, arg3);
100 }
101
102
103
104 public boolean evaluate(Context arg0, Writer arg1, String arg2, Reader arg3)
105 throws ParseErrorException, MethodInvocationException,
106 ResourceNotFoundException, IOException
107 {
108 return Velocity.evaluate(arg0, arg1, arg2, arg3);
109 }
110
111
112
113 public boolean evaluate(Context arg0, Writer arg1, String arg2, String arg3)
114 throws ParseErrorException, MethodInvocationException,
115 ResourceNotFoundException, IOException
116 {
117 return Velocity.evaluate(arg0, arg1, arg2, arg3);
118 }
119
120
121
122 public Object getProperty(String arg0)
123 {
124 return Velocity.getProperty(arg0);
125 }
126
127
128
129 public Template getTemplate(String arg0, String arg1)
130 throws ResourceNotFoundException, ParseErrorException, Exception
131 {
132 return Velocity.getTemplate(arg0, arg1);
133 }
134
135
136
137 public Template getTemplate(String arg0) throws ResourceNotFoundException,
138 ParseErrorException, Exception
139 {
140 return Velocity.getTemplate(arg0);
141 }
142
143
144
145 public void info(Object arg0)
146 {
147 Velocity.info(arg0);
148 }
149
150
151
152 public void init() throws Exception
153 {
154 Velocity.init();
155 }
156
157
158
159 public void init(Properties arg0) throws Exception
160 {
161 Velocity.init(arg0);
162 }
163
164
165
166 public void init(String arg0) throws Exception
167 {
168 Velocity.init(arg0);
169 }
170
171
172
173 public boolean invokeVelocimacro(String arg0, String arg1, String[] arg2,
174 Context arg3, Writer arg4) throws Exception
175 {
176 return Velocity.invokeVelocimacro(arg0, arg1, arg2, arg3, arg4);
177 }
178
179
180
181 public boolean mergeTemplate(String arg0, Context arg1, Writer arg2)
182 throws ResourceNotFoundException, ParseErrorException,
183 MethodInvocationException, Exception
184 {
185 return Velocity.mergeTemplate(arg0, arg1, arg2);
186 }
187
188
189
190 public boolean mergeTemplate(String arg0, String arg1, Context arg2,
191 Writer arg3) throws ResourceNotFoundException, ParseErrorException,
192 MethodInvocationException, Exception
193 {
194 return Velocity.mergeTemplate(arg0, arg1, arg2, arg3);
195 }
196
197
198
199 public void setApplicationAttribute(Object arg0, Object arg1)
200 {
201 Velocity.setApplicationAttribute(arg0, arg1);
202 }
203
204
205
206 public void setConfiguration(Configuration arg0)
207 {
208 Velocity.setConfiguration(arg0);
209 }
210
211
212
213 public void setExtendedProperties(ExtendedProperties arg0)
214 {
215 Velocity.setExtendedProperties(arg0);
216 }
217
218
219
220 public void setProperty(String arg0, Object arg1)
221 {
222 Velocity.setProperty(arg0, arg1);
223 }
224
225
226
227 public boolean templateExists(String arg0)
228 {
229 return Velocity.templateExists(arg0);
230 }
231
232
233
234 public void warn(Object arg0)
235 {
236 Velocity.warn(arg0);
237 }
238
239 }