Jacson

de.spieleck.app.jacson.ant
Class JacsonTask

java.lang.Object
  extended byMatchingTask
      extended byde.spieleck.app.jacson.ant.JacsonTask
All Implemented Interfaces:
JacsonNames

public class JacsonTask
extends MatchingTask
implements JacsonNames

Jacson processing from within an Ant task.

This contains pieces of code taken from Ant's XSLTProcess.

In general I though Ant would support the TaskWriter even more. But it wasn't too bad.

XXX Make the JacsonSource configurable, currently it is LineChunkSource.

Author:
fsn
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface de.spieleck.app.jacson.JacsonNames
BLOCKREPORT, JS_DEBUG_FLAG, JS_MAIN_CFG, JS_OBJ_EVAL, JS_OBJ_FILTER, JS_OBJ_LABEL, JS_OBJ_REPORT, JS_OBJ_SELECT, JS_OBJ_SOURCE, JS_PCK_EVAL, JS_PCK_FILTER, JS_PCK_REPORT, JS_PCK_SELECT, JS_PCK_SOURCE, JS_REP_BLOCK, JS_REP_CHUNK, JS_REP_EVAL, JS_REP_FILTER, JS_REP_LABEL, JS_REP_LIST, JS_REP_LOG, JS_REP_NAME, JS_REP_NUMBER, JS_REP_PROC, JS_REP_RESULT, JS_REP_SUMMARY, JS_REP_TIME, JS_REP_TSTAMP, JS_REPORT_CFG, JS_STATE_ID
 
Constructor Summary
JacsonTask()
          Creates a new JacsonTask Task.
 
Method Summary
 JacsonTaskParam createParam()
          Create an instance of an parameter for configuration.
 void execute()
          Executes the task.
 void init()
           
 ConfigNode obtainConfig(JacsonState js)
          go ant hunt down a configuration.
 void setBasedir(java.io.File dir)
          Set the base directory; optional, default is the project's basedir.
 void setConfig(java.lang.String configName)
          Name of the configFile to use - given either relative to the project's basedir or as an absolute path; required.
 void setForce(boolean force)
          Set whether to check dependencies, or always generate; optional, default is false.
 void setIn(java.io.File inFile)
          Specifies a single input file.
 void setOut(java.io.File outFile)
          Specifies an files where the reports go to.
 void setScanIncludedDirectories(boolean b)
          Whether to style all files in the included directories as well; optional, default is true.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JacsonTask

public JacsonTask()
Creates a new JacsonTask Task.

Method Detail

setScanIncludedDirectories

public void setScanIncludedDirectories(boolean b)
Whether to style all files in the included directories as well; optional, default is true.

Parameters:
b - true if files in included directories are processed.

obtainConfig

public ConfigNode obtainConfig(JacsonState js)
                        throws BuildException
go ant hunt down a configuration.

Throws:
BuildException

execute

public void execute()
             throws BuildException
Executes the task.

Throws:
BuildException - if there is a problem.

setForce

public void setForce(boolean force)
Set whether to check dependencies, or always generate; optional, default is false.

Parameters:
force - true if always generate.

setBasedir

public void setBasedir(java.io.File dir)
Set the base directory; optional, default is the project's basedir.

Parameters:
dir - the base directory

setConfig

public void setConfig(java.lang.String configName)
Name of the configFile to use - given either relative to the project's basedir or as an absolute path; required.

Parameters:
configName - the configFile to use

setIn

public void setIn(java.io.File inFile)
Specifies a single input file.

Parameters:
inFile - the input file

setOut

public void setOut(java.io.File outFile)
Specifies an files where the reports go to.

Parameters:
outFile - the output file

createParam

public JacsonTaskParam createParam()
Create an instance of an parameter for configuration.

Returns:
an instance of the Param class to be configured.

init

public void init()
          throws BuildException
Throws:
BuildException

Spieleck

Copyleft 2002 spieleck.de.