org.foray.app.ant
Class FOrayAntTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.foray.app.ant.FOrayAntTask
All Implemented Interfaces:
Cloneable

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

Wrapper for FOray which allows it to be accessed from within an Ant task. Accepts the inputs:


Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
FOrayAntTask()
           
 
Method Summary
 void addFileset(org.apache.tools.ant.types.FileSet set)
          Adds a set of fo files (nested fileset attribute).
 void execute()
          Starts execution of this task.
 File getBasedir()
          Gets the base directory.
protected  String getFileExtension()
          Returns the output file extension.
 List<org.apache.tools.ant.types.FileSet> getFilesets()
          Returns the filesets.
 File getFofile()
          Gets the input file.
 boolean getForce()
          Gets the force attribute.
 String getFormat()
          Gets the output format (MIME type).
 boolean getLogFiles()
          Returns the "log filenames" flag.
 org.apache.commons.logging.Log getLogger()
          Returns the logger.
 int getMessageType()
          Returns the message type corresponding to Property.MSG_(INFO | VERBOSE | DEBUG) representing the current message level.
 File getOutdir()
          Gets the output directory.
 File getOutfile()
          Gets the output file.
protected  OutputTargetType getRendererType()
          Returns the renderer type.
 URL getUserConfig()
          Returns the URL of the user configuration.
 void setBasedir(File baseDir)
          Sets the base directory.
 void setFofile(File foFile)
          Sets the input file.
 void setForce(boolean force)
          Set whether to check dependencies, or to always generate; optional, default is false.
 void setFormat(String format)
          Sets output format (MIME type).
 void setLogFiles(boolean aBoolean)
          Controls whether the filenames of the files that are processed are logged or not.
 void setMessagelevel(String messageLevel)
          Sets the message level to be used while processing.
 void setOutdir(File outDir)
          Sets the output directory.
 void setOutfile(File outFile)
          Sets the output file.
 void setUserconfig(URL userConfig)
          Sets the user configuration file.
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FOrayAntTask

public FOrayAntTask()
Method Detail

setUserconfig

public void setUserconfig(URL userConfig)
Sets the user configuration file.

Parameters:
userConfig - File containing the user configuration.

setFofile

public void setFofile(File foFile)
Sets the input file.

Parameters:
foFile - The FO input file.

getFofile

public File getFofile()
Gets the input file.

Returns:
The input file.

addFileset

public void addFileset(org.apache.tools.ant.types.FileSet set)
Adds a set of fo files (nested fileset attribute).

Parameters:
set - The new FileSet instance to add.

setForce

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

Parameters:
force - true if always generate.

getForce

public boolean getForce()
Gets the force attribute.

Returns:
The force attribute.

setOutfile

public void setOutfile(File outFile)
Sets the output file.

Parameters:
outFile - The File to which the output should be written.

getOutfile

public File getOutfile()
Gets the output file.

Returns:
The output file.

setOutdir

public void setOutdir(File outDir)
Sets the output directory.

Parameters:
outDir - Directory to which the output should be written.

getOutdir

public File getOutdir()
Gets the output directory.

Returns:
The output directory.

setFormat

public void setFormat(String format)
Sets output format (MIME type).

Parameters:
format - The mime type of the output.

getFormat

public String getFormat()
Gets the output format (MIME type).

Returns:
The mime type of the output.

setMessagelevel

public void setMessagelevel(String messageLevel)
Sets the message level to be used while processing.

Parameters:
messageLevel - String containing (info | verbose | debug).

getMessageType

public int getMessageType()
Returns the message type corresponding to Property.MSG_(INFO | VERBOSE | DEBUG) representing the current message level.

Returns:
The Ant message level.

setBasedir

public void setBasedir(File baseDir)
Sets the base directory. Currently ignored.

Parameters:
baseDir - File to use as a working directory.

getBasedir

public File getBasedir()
Gets the base directory.

Returns:
The base directory.

setLogFiles

public void setLogFiles(boolean aBoolean)
Controls whether the filenames of the files that are processed are logged or not.

Parameters:
aBoolean - Set to true to log the filenames.

getLogFiles

public boolean getLogFiles()
Returns the "log filenames" flag.

Returns:
The "log filenames" flag.

execute

public void execute()
Starts execution of this task.

Overrides:
execute in class org.apache.tools.ant.Task

getLogger

public org.apache.commons.logging.Log getLogger()
Returns the logger.

Returns:
The logger.

getRendererType

protected OutputTargetType getRendererType()
Returns the renderer type.

Returns:
The renderer type to be used for processing.

getFileExtension

protected String getFileExtension()
Returns the output file extension.

Returns:
The output file extension.

getFilesets

public List<org.apache.tools.ant.types.FileSet> getFilesets()
Returns the filesets.

Returns:
The filesets.

getUserConfig

public URL getUserConfig()
Returns the URL of the user configuration.

Returns:
The user configuration.


Copyright © 2017. All rights reserved.