blob: bacb89a4e6346f28716b7791c19c2b134084e1b1 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Wed Apr 14 08:26:35 EDT 2004 -->
<TITLE>
Velocity 1.4 API: Class TexenTask
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/TexenTask.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="TexenTask.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.velocity.texen.ant</FONT>
<BR>
Class TexenTask</H2>
<PRE>
<B>org.apache.velocity.texen.ant.TexenTask</B>
</PRE>
<HR>
<DL>
<DT>public class <B>TexenTask</B></DL>
<P>
An ant task for generating output by using Velocity
<P>
<DL>
<DT><B>Version: </B><DD>$Id: TexenTask.java,v 1.39.4.1 2004/03/03 23:23:07 geirm Exp $</DD>
<DT><B>Author: </B><DD><a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>, <a href="robertdonkin@mac.com">Robert Burrell Donkin</a></DD>
</DL>
<HR>
<P>
<!-- ======== INNER CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;org.apache.commons.collections.ExtendedProperties</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#contextProperties">contextProperties</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
These are properties that are fed into the
initial context from a properties file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#controlTemplate">controlTemplate</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is the control template that governs the output.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#ERR_MSG_FRAGMENT">ERR_MSG_FRAGMENT</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This message fragment (telling users to consult the log or
invoke ant with the -debug flag) is appended to rethrown
exception messages.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#fileSeparator">fileSeparator</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Path separator.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#inputEncoding">inputEncoding</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is the encoding for the input file(s)
(templates).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#outputDirectory">outputDirectory</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is where texen will place all the output
that is a product of the generation process.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#outputEncoding">outputEncoding</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is the encoding for the output file(s).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#outputFile">outputFile</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is the file where the generated text
will be placed.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#templatePath">templatePath</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is where Velocity will look for templates
using the file template loader.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#useClasspath">useClasspath</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Property which controls whether the classpath
will be used when trying to locate templates.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#TexenTask()">TexenTask</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#cleanup()">cleanup</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A hook method called at the end of <A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#execute()"><CODE>execute()</CODE></A> which can
be overridden to perform any necessary cleanup activities (such
as the release of database connections, etc.).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#execute()">execute</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Execute the input script with Velocity</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;org.apache.commons.collections.ExtendedProperties</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#getContextProperties()">getContextProperties</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the context properties that will be
fed into the initial context be the
generating process starts.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#getControlTemplate()">getControlTemplate</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the control template for the
generating process.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#getOutputDirectory()">getOutputDirectory</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the output directory.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#getOutputFile()">getOutputFile</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the output file for the
generation process.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#getTemplatePath()">getTemplatePath</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the path where Velocity will look
for templates using the file template
loader.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/apache/velocity/context/Context.html">Context</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#initControlContext()">initControlContext</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a VelocityContext.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#populateInitialContext(org.apache.velocity.context.Context)">populateInitialContext</A></B>(<A HREF="../../../../../org/apache/velocity/context/Context.html">Context</A>&nbsp;context)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Place useful objects into the initial context.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#setContextProperties(java.lang.String)">setContextProperties</A></B>(java.lang.String&nbsp;file)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the context properties that will be
fed into the initial context be the
generating process starts.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#setControlTemplate(java.lang.String)">setControlTemplate</A></B>(java.lang.String&nbsp;controlTemplate)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[REQUIRED] Set the control template for the
generating process.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#setInputEncoding(java.lang.String)">setInputEncoding</A></B>(java.lang.String&nbsp;inputEncoding)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the input (template) encoding.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#setOutputDirectory(java.io.File)">setOutputDirectory</A></B>(java.io.File&nbsp;outputDirectory)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[REQUIRED] Set the output directory.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#setOutputEncoding(java.lang.String)">setOutputEncoding</A></B>(java.lang.String&nbsp;outputEncoding)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the output encoding.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#setOutputFile(java.lang.String)">setOutputFile</A></B>(java.lang.String&nbsp;outputFile)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[REQUIRED] Set the output file for the
generation process.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#setTemplatePath(java.lang.String)">setTemplatePath</A></B>(java.lang.String&nbsp;templatePath)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[REQUIRED] Set the path where Velocity will look
for templates using the file template
loader.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#setUseClasspath(boolean)">setUseClasspath</A></B>(boolean&nbsp;useClasspath)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the use of the classpath in locating templates</TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="ERR_MSG_FRAGMENT"><!-- --></A><H3>
ERR_MSG_FRAGMENT</H3>
<PRE>
private static final java.lang.String <B>ERR_MSG_FRAGMENT</B></PRE>
<DL>
<DD>This message fragment (telling users to consult the log or
invoke ant with the -debug flag) is appended to rethrown
exception messages.</DL>
<HR>
<A NAME="controlTemplate"><!-- --></A><H3>
controlTemplate</H3>
<PRE>
protected java.lang.String <B>controlTemplate</B></PRE>
<DL>
<DD>This is the control template that governs the output.
It may or may not invoke the services of worker
templates.</DL>
<HR>
<A NAME="templatePath"><!-- --></A><H3>
templatePath</H3>
<PRE>
protected java.lang.String <B>templatePath</B></PRE>
<DL>
<DD>This is where Velocity will look for templates
using the file template loader.</DL>
<HR>
<A NAME="outputDirectory"><!-- --></A><H3>
outputDirectory</H3>
<PRE>
protected java.lang.String <B>outputDirectory</B></PRE>
<DL>
<DD>This is where texen will place all the output
that is a product of the generation process.</DL>
<HR>
<A NAME="outputFile"><!-- --></A><H3>
outputFile</H3>
<PRE>
protected java.lang.String <B>outputFile</B></PRE>
<DL>
<DD>This is the file where the generated text
will be placed.</DL>
<HR>
<A NAME="outputEncoding"><!-- --></A><H3>
outputEncoding</H3>
<PRE>
protected java.lang.String <B>outputEncoding</B></PRE>
<DL>
<DD>This is the encoding for the output file(s).</DL>
<HR>
<A NAME="inputEncoding"><!-- --></A><H3>
inputEncoding</H3>
<PRE>
protected java.lang.String <B>inputEncoding</B></PRE>
<DL>
<DD>This is the encoding for the input file(s)
(templates).</DL>
<HR>
<A NAME="contextProperties"><!-- --></A><H3>
contextProperties</H3>
<PRE>
protected org.apache.commons.collections.ExtendedProperties <B>contextProperties</B></PRE>
<DL>
<DD><p>
These are properties that are fed into the
initial context from a properties file. This
is simply a convenient way to set some values
that you wish to make available in the context.
</p>
<p>
These values are not critical, like the template path
or output path, but allow a convenient way to
set a value that may be specific to a particular
generation task.
</p>
<p>
For example, if you are generating scripts to allow
user to automatically create a database, then
you might want the <code>$databaseName</code>
to be placed
in the initial context so that it is available
in a script that might look something like the
following:
<code><pre>
#!bin/sh
echo y | mysqladmin create $databaseName
</pre></code>
The value of <code>$databaseName</code> isn't critical to
output, and you obviously don't want to change
the ant task to simply take a database name.
So initial context values can be set with
properties file.</DL>
<HR>
<A NAME="useClasspath"><!-- --></A><H3>
useClasspath</H3>
<PRE>
protected boolean <B>useClasspath</B></PRE>
<DL>
<DD>Property which controls whether the classpath
will be used when trying to locate templates.</DL>
<HR>
<A NAME="fileSeparator"><!-- --></A><H3>
fileSeparator</H3>
<PRE>
private java.lang.String <B>fileSeparator</B></PRE>
<DL>
<DD>Path separator.</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="TexenTask()"><!-- --></A><H3>
TexenTask</H3>
<PRE>
public <B>TexenTask</B>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="setControlTemplate(java.lang.String)"><!-- --></A><H3>
setControlTemplate</H3>
<PRE>
public void <B>setControlTemplate</B>(java.lang.String&nbsp;controlTemplate)</PRE>
<DL>
<DD>[REQUIRED] Set the control template for the
generating process.</DL>
<HR>
<A NAME="getControlTemplate()"><!-- --></A><H3>
getControlTemplate</H3>
<PRE>
public java.lang.String <B>getControlTemplate</B>()</PRE>
<DL>
<DD>Get the control template for the
generating process.</DL>
<HR>
<A NAME="setTemplatePath(java.lang.String)"><!-- --></A><H3>
setTemplatePath</H3>
<PRE>
public void <B>setTemplatePath</B>(java.lang.String&nbsp;templatePath)
throws java.lang.Exception</PRE>
<DL>
<DD>[REQUIRED] Set the path where Velocity will look
for templates using the file template
loader.</DL>
<HR>
<A NAME="getTemplatePath()"><!-- --></A><H3>
getTemplatePath</H3>
<PRE>
public java.lang.String <B>getTemplatePath</B>()</PRE>
<DL>
<DD>Get the path where Velocity will look
for templates using the file template
loader.</DL>
<HR>
<A NAME="setOutputDirectory(java.io.File)"><!-- --></A><H3>
setOutputDirectory</H3>
<PRE>
public void <B>setOutputDirectory</B>(java.io.File&nbsp;outputDirectory)</PRE>
<DL>
<DD>[REQUIRED] Set the output directory. It will be
created if it doesn't exist.</DL>
<HR>
<A NAME="getOutputDirectory()"><!-- --></A><H3>
getOutputDirectory</H3>
<PRE>
public java.lang.String <B>getOutputDirectory</B>()</PRE>
<DL>
<DD>Get the output directory.</DL>
<HR>
<A NAME="setOutputFile(java.lang.String)"><!-- --></A><H3>
setOutputFile</H3>
<PRE>
public void <B>setOutputFile</B>(java.lang.String&nbsp;outputFile)</PRE>
<DL>
<DD>[REQUIRED] Set the output file for the
generation process.</DL>
<HR>
<A NAME="setOutputEncoding(java.lang.String)"><!-- --></A><H3>
setOutputEncoding</H3>
<PRE>
public void <B>setOutputEncoding</B>(java.lang.String&nbsp;outputEncoding)</PRE>
<DL>
<DD>Set the output encoding.</DL>
<HR>
<A NAME="setInputEncoding(java.lang.String)"><!-- --></A><H3>
setInputEncoding</H3>
<PRE>
public void <B>setInputEncoding</B>(java.lang.String&nbsp;inputEncoding)</PRE>
<DL>
<DD>Set the input (template) encoding.</DL>
<HR>
<A NAME="getOutputFile()"><!-- --></A><H3>
getOutputFile</H3>
<PRE>
public java.lang.String <B>getOutputFile</B>()</PRE>
<DL>
<DD>Get the output file for the
generation process.</DL>
<HR>
<A NAME="setContextProperties(java.lang.String)"><!-- --></A><H3>
setContextProperties</H3>
<PRE>
public void <B>setContextProperties</B>(java.lang.String&nbsp;file)</PRE>
<DL>
<DD>Set the context properties that will be
fed into the initial context be the
generating process starts.</DL>
<HR>
<A NAME="getContextProperties()"><!-- --></A><H3>
getContextProperties</H3>
<PRE>
public org.apache.commons.collections.ExtendedProperties <B>getContextProperties</B>()</PRE>
<DL>
<DD>Get the context properties that will be
fed into the initial context be the
generating process starts.</DL>
<HR>
<A NAME="setUseClasspath(boolean)"><!-- --></A><H3>
setUseClasspath</H3>
<PRE>
public void <B>setUseClasspath</B>(boolean&nbsp;useClasspath)</PRE>
<DL>
<DD>Set the use of the classpath in locating templates<DD><DL>
<DT><B>Parameters:</B><DD><CODE>boolean</CODE> - true means the classpath will be used.</DL>
</DD>
</DL>
<HR>
<A NAME="initControlContext()"><!-- --></A><H3>
initControlContext</H3>
<PRE>
public <A HREF="../../../../../org/apache/velocity/context/Context.html">Context</A> <B>initControlContext</B>()
throws java.lang.Exception</PRE>
<DL>
<DD>Creates a VelocityContext.<DD><DL>
<DT><B>Returns:</B><DD>new Context<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - the execute method will catch
and rethrow as a <code>BuildException</code></DL>
</DD>
</DL>
<HR>
<A NAME="execute()"><!-- --></A><H3>
execute</H3>
<PRE>
public void <B>execute</B>()
throws org.apache.tools.ant.BuildException</PRE>
<DL>
<DD>Execute the input script with Velocity<DD><DL>
<DT><B>Throws:</B><DD><CODE>BuildException</CODE> - BuildExceptions are thrown when required attributes are missing.
Exceptions thrown by Velocity are rethrown as BuildExceptions.</DL>
</DD>
</DL>
<HR>
<A NAME="populateInitialContext(org.apache.velocity.context.Context)"><!-- --></A><H3>
populateInitialContext</H3>
<PRE>
protected void <B>populateInitialContext</B>(<A HREF="../../../../../org/apache/velocity/context/Context.html">Context</A>&nbsp;context)
throws java.lang.Exception</PRE>
<DL>
<DD><p>Place useful objects into the initial context.</p>
<p>TexenTask places <code>Date().toString()</code> into the
context as <code>$now</code>. Subclasses who want to vary the
objects in the context should override this method.</p>
<p><code>$generator</code> is not put into the context in this
method.</p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>context</CODE> - The context to populate, as retrieved from
<A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#initControlContext()"><CODE>initControlContext()</CODE></A>.<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - Error while populating context. The <A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#execute()"><CODE>execute()</CODE></A> method will catch and rethrow as a
<code>BuildException</code>.</DL>
</DD>
</DL>
<HR>
<A NAME="cleanup()"><!-- --></A><H3>
cleanup</H3>
<PRE>
protected void <B>cleanup</B>()
throws java.lang.Exception</PRE>
<DL>
<DD>A hook method called at the end of <A HREF="../../../../../org/apache/velocity/texen/ant/TexenTask.html#execute()"><CODE>execute()</CODE></A> which can
be overridden to perform any necessary cleanup activities (such
as the release of database connections, etc.). By default,
does nothing.<DD><DL>
<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - Problem cleaning up.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/TexenTask.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="TexenTask.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
Copyright © 2002 Apache Software Foundation. All Rights Reserved.
</BODY>
</HTML>