1 package org.apache.torque.task;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 import org.apache.velocity.context.Context;
20
21 /***
22 * An ant task for generating output by using Velocity
23 *
24 * @author <a href="mailto:mpoeschl@marmot.at">Martin Poeschl</a>
25 * @version $Id: TorqueDocumentationTask.java 239624 2005-08-24 12:18:03Z henning $
26 */
27 public class TorqueDocumentationTask extends TorqueDataModelTask
28 {
29 /*** output format for the generated docs */
30 private String outputFormat;
31
32 /***
33 * Get the current output format.
34 *
35 * @return the current output format
36 */
37 public String getOutputFormat()
38 {
39 return outputFormat;
40 }
41
42 /***
43 * Set the current output format.
44 *
45 * @param v output format
46 */
47 public void setOutputFormat(String v)
48 {
49 outputFormat = v;
50 }
51
52 /***
53 * Place our target package value into the context for use in the templates.
54 *
55 * @return the context
56 * @throws Exception a generic exception
57 */
58 public Context initControlContext() throws Exception
59 {
60 super.initControlContext();
61 context.put("outputFormat", outputFormat);
62 context.put("escape", new org.apache.velocity.anakia.Escape());
63 return context;
64 }
65 }