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