org.howardism.ant
Class FreeMarkerPlugin

java.lang.Object
  extended byorg.howardism.ant.FreeMarkerPlugin
All Implemented Interfaces:
WebTemplatePlugin

public class FreeMarkerPlugin
extends java.lang.Object
implements WebTemplatePlugin

This plugin to the WebTemplate Ant task interface the FreeMarker engine.

See www.FreeMarker.org for details and documentation for how the templates should be written.

See Also:
WebTemplate

Constructor Summary
FreeMarkerPlugin()
           
 
Method Summary
 void convert(java.io.File srcParent, java.io.File destFile, java.lang.String template, java.util.Properties attributes)
          Converts a single file using the template engine.
 void setParent(org.apache.tools.ant.Task parent)
          Allows the WebTemplate task to pass the plugin a reference to the Parent (the caller) so that it can send it log messages.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FreeMarkerPlugin

public FreeMarkerPlugin()
Method Detail

convert

public void convert(java.io.File srcParent,
                    java.io.File destFile,
                    java.lang.String template,
                    java.util.Properties attributes)
             throws org.apache.tools.ant.BuildException
Converts a single file using the template engine.

The parameters include the source data file and the template as well as the destination file where the resulting converted file will be written by this method.

Specified by:
convert in interface WebTemplatePlugin
Parameters:
srcParent - name of the input file's parent for locating the template file.
destFile - name of the destination file.
template - name of the template file
attributes - A java.util.Properties file that contains the data and content
Throws:
org.apache.tools.ant.BuildException

setParent

public void setParent(org.apache.tools.ant.Task parent)
Description copied from interface: WebTemplatePlugin
Allows the WebTemplate task to pass the plugin a reference to the Parent (the caller) so that it can send it log messages.

Specified by:
setParent in interface WebTemplatePlugin
Parameters:
parent -