de.dokutransdata.nsd2ltx
Class Nsd2LtxTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by de.dokutransdata.nsd2ltx.Nsd2LtxTask

public class Nsd2LtxTask
extends org.apache.tools.ant.Task

Ant task for Nsd2Ltx. This task provides a mapping between all current Nsd2Ltx configuration file options (as of 1.2.18) and Ant build fileset.

Since:
Ant 1.5
Version:
$Revision: 1.8.4.8 $

Field Summary
static java.lang.String CONFIG_FILE
          Name of the temporary configuration file that will be created in ${user.home}.
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
Nsd2LtxTask()
          Initializes the Nsd2Ltx Configuration options.
 
Method Summary
 void activityLog(boolean terseMessage, java.lang.String theMessage)
          This method allows a single point of control over the task output verbosity.
 void add(org.apache.tools.ant.types.FileSet f)
          Callback-Methode um eingeschachtelte <fileset>-Elemente einfügen zu können.
 void execute()
          This is the main execution entry-point of the task.
 boolean getDescription_structo()
           
 java.lang.String getOutput_directory()
           
 java.lang.String getOutput_mode()
           
 java.lang.String getVersionCompatible()
           
 void setConfigFilename(java.lang.String attr)
          Core Ant task element which specifies an non-generated Nsd2Ltx base configuration file.
 void setDescription_structo(boolean newValue)
          Callback-Methode für den Ant-Prozess zum Setzen des Attributes description_structo
 void setNsd2LtxPath(java.lang.String attr)
          Core Ant task element which specifies a path to the Nsd2Ltx executable.
 void setOutput_directory(java.lang.String newValue)
          Callback-Methode für den Ant-Prozess zum Setzen des Attributes output_directory
 void setOutput_mode(java.lang.String newMode)
          Callback-Methode für den Ant-Prozess zum Setzen des Attributes output_mode
 void setVerbose(boolean attr)
          Core Ant task element that controls the output verbosity of this Ant task.
 void setVersionCompatible(java.lang.String newVersion)
           
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIG_FILE

public static final java.lang.String CONFIG_FILE
Name of the temporary configuration file that will be created in ${user.home}.

Constructor Detail

Nsd2LtxTask

public Nsd2LtxTask()
Initializes the Nsd2Ltx Configuration options.

Method Detail

add

public void add(org.apache.tools.ant.types.FileSet f)
Callback-Methode um eingeschachtelte <fileset>-Elemente einfügen zu können.

Parameters:
f - from build.xml

setOutput_mode

public void setOutput_mode(java.lang.String newMode)
Callback-Methode für den Ant-Prozess zum Setzen des Attributes output_mode

Parameters:
newMode - Neuer Wert (wird nicht geprüft!) aus build.xml

getOutput_mode

public java.lang.String getOutput_mode()

setDescription_structo

public void setDescription_structo(boolean newValue)
Callback-Methode für den Ant-Prozess zum Setzen des Attributes description_structo

Parameters:
newValue - Neuer Wert aus build.xml

getDescription_structo

public boolean getDescription_structo()

setOutput_directory

public void setOutput_directory(java.lang.String newValue)
Callback-Methode für den Ant-Prozess zum Setzen des Attributes output_directory

Parameters:
newValue - Neues Verzeichnis (wird nicht geprüft!) aus build.xml

getOutput_directory

public java.lang.String getOutput_directory()

execute

public final void execute()
                   throws org.apache.tools.ant.BuildException
This is the main execution entry-point of the task.

Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException - thrown in case any problem executing the task.

setVersionCompatible

public final void setVersionCompatible(java.lang.String newVersion)
Parameters:
newVersion - Sets the version against which compatibility check is to be run.

getVersionCompatible

public final java.lang.String getVersionCompatible()
Returns:
Returns the version against which the compatibility check is to be run.

setVerbose

public final void setVerbose(boolean attr)
Core Ant task element that controls the output verbosity of this Ant task. By default, verbosity is minimized to allow for cleaner build logs. Turn this on, if you need more detailed diagnostic information.
\test there is a marked difference in output depending on the value of verbose.

Parameters:
attr - from build.xml.

setConfigFilename

public final void setConfigFilename(java.lang.String attr)
Core Ant task element which specifies an non-generated Nsd2Ltx base configuration file. All <nsd2ltx> elements and nested elements that appear in the build.xml file will take precedence over this base configuration.

The base configuration file will not be updated. Nsd2Ltx will be invoked with an amalgamated configuration file which is derived from either this configuration file or if not specified, a Nsd2Ltx default and then Ant task flavored almalgamated configuration file.

\test If the configuration file is set, then the amalgamated configuration file is retained.

Parameters:
attr - from build.xml.

setNsd2LtxPath

public final void setNsd2LtxPath(java.lang.String attr)
Core Ant task element which specifies a path to the Nsd2Ltx executable. By default the application name "nsd2ltx" is used which presumes Nsd2Ltx is on the path.
\test Specification of a bogus application name will fail.
\todo Add a test to see that the specified executable exists.

Parameters:
attr - from build.xml.

activityLog

public final void activityLog(boolean terseMessage,
                              java.lang.String theMessage)
This method allows a single point of control over the task output verbosity.
\test message output is conditional. Some messages are always output, while others are only sometimes output.

Parameters:
terseMessage - is a flag that indicates the calling code wants this message to appear regardless of the current verbosity level.
theMessage - to be output, guard condition permitting.