|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.webmacro.tools.EvalTemplates
EvalTemplates supports an ant task execution to evaluate a set of templates.
This class has been structured to make use of WMEval which maintains an instance of WM and has support methods for evaluating templates and routing output.
This is a batch oriented class which is referenced normally as part of an ant build script. See the WebMacro build script for actual usage.
TemplateEvalAntTask
Constructor Summary | |
EvalTemplates()
|
Method Summary | |
java.lang.Object |
getContextElement(java.lang.String key)
After a template has been run, this method will return an object in the context by name. |
static void |
main(java.lang.String[] args)
Normally this main is invoked from an ant task but it can be invoked from any main launcher including a command line. |
void |
run(java.lang.String inputTemplate)
Evaluates a single template file argument. |
Context |
run(java.lang.String inputTemplate,
java.lang.String outFile,
boolean append,
java.lang.String encoding)
Evaluates a single template file argument. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public EvalTemplates()
Method Detail |
public void run(java.lang.String inputTemplate)
public Context run(java.lang.String inputTemplate, java.lang.String outFile, boolean append, java.lang.String encoding)
This method provides programmer control over the evaluation options.
inputTemplate
- A template in the resource path.outFile
- An output file for the template output. If
null, the template must set the output.append
- If true, output will be appended to existing file.encoding
- The encoding to use on the output file, null allowed.public java.lang.Object getContextElement(java.lang.String key)
public static void main(java.lang.String[] args) throws java.lang.Exception
args
- One or more file references to an input template file name.
java.lang.Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |