|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tools.ant.ProjectComponent org.apache.tools.ant.Task org.cesta.taskdefs.TransformationTask
public class TransformationTask
TransformationTask ANT task. It provides simple interface for executing transformations. Core ANT types can be used (FileSet, Mapper, Path, Parameter) to easily configure transformations.
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 | |
---|---|
TransformationTask()
|
Method Summary | |
---|---|
void |
add(org.apache.tools.ant.util.FileNameMapper fileNameMapper)
Add a nested filenamemapper. |
void |
add(org.apache.tools.ant.types.ResourceCollection rc)
Add resource collection |
void |
addConfiguredParam(Parameter param)
Add a Parameter. |
protected void |
addMappedFile(java.io.File file)
Simplyfied method for adding file without base directory |
protected void |
addMappedFile(java.io.File file,
java.io.File baseDir)
Protected method for simplyfied addinng of mapped files |
org.apache.tools.ant.types.Path |
createClasspath()
The classpath to use when looking up a resource. |
org.apache.tools.ant.types.Mapper |
createMapper()
Define the mapper to map source to destination files. |
void |
execute()
Main entry point for this task. |
java.lang.String |
getClassname()
Returns classname of transformation (simple or full classname) |
org.apache.tools.ant.types.Path |
getClasspath()
Get the classpath used when looking up a resource. |
java.io.File |
getDestDir()
Returns destination directory |
java.io.File |
getDestFile()
Returns single destination file |
java.util.List<MappedFile> |
getMappedFiles()
Returns list of mapped files, that should be transformed. |
java.io.File |
getSrcDir()
Returns source directory |
java.io.File |
getSrcFile()
Returns source file |
void |
init()
Initialization of the task. |
protected void |
initClassloader()
Initializes default class loader. |
boolean |
isFailonerror()
Returns current value of failOnError flag. |
protected void |
restoreClassloader()
Restores default class loader. |
void |
setClassname(java.lang.String classname)
Sets classname of transformation (simple or full classname) |
void |
setClasspath(org.apache.tools.ant.types.Path classpath)
The classpath to use when looking up a resource. |
void |
setClasspathRef(org.apache.tools.ant.types.Reference r)
the classpath to use when looking up a resource, given as reference to a <path> defined elsewhere |
void |
setDestDir(java.io.File destDir)
Sets destination directory |
void |
setDestFile(java.io.File destFile)
Sets destination file |
void |
setFailonerror(boolean failOnError)
Boolean to control whether failure to execute should throw a BuildException or just print an error. |
void |
setSrcDir(java.io.File srcDir)
Sets source directory |
void |
setSrcFile(java.io.File srcFile)
Sets source file |
Methods inherited from class org.apache.tools.ant.Task |
---|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, 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 |
---|
public TransformationTask()
Method Detail |
---|
public void addConfiguredParam(Parameter param)
param
- a Parameter
valuepublic void add(org.apache.tools.ant.types.ResourceCollection rc)
rc
- resource collection to addpublic void setClasspath(org.apache.tools.ant.types.Path classpath)
classpath
- to add to any existing classpathpublic org.apache.tools.ant.types.Path createClasspath()
public void setClasspathRef(org.apache.tools.ant.types.Reference r)
r
- a reference to a classpathpublic org.apache.tools.ant.types.Path getClasspath()
public org.apache.tools.ant.types.Mapper createMapper() throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildException
- if more than one mapper is defined.public void add(org.apache.tools.ant.util.FileNameMapper fileNameMapper)
fileNameMapper
- the mapper to add.public void setFailonerror(boolean failOnError)
failOnError
- public boolean isFailonerror()
public java.io.File getDestDir()
public void setDestDir(java.io.File destDir)
destDir
- the destDir to setpublic java.io.File getDestFile()
public void setDestFile(java.io.File destFile)
destFile
- the destFile to setpublic java.io.File getSrcDir()
public void setSrcDir(java.io.File srcDir)
srcDir
- the srcDir to setpublic java.io.File getSrcFile()
public void setSrcFile(java.io.File srcFile)
srcFile
- the srcFile to setpublic java.lang.String getClassname()
public void setClassname(java.lang.String classname)
classname
- the classname to setprotected void initClassloader()
protected void restoreClassloader()
protected void addMappedFile(java.io.File file, java.io.File baseDir)
file
- file to addbaseDir
- base directory for fileprotected void addMappedFile(java.io.File file)
file
- file to addpublic java.util.List<MappedFile> getMappedFiles()
public void init() throws org.apache.tools.ant.BuildException
init
in class org.apache.tools.ant.Task
org.apache.tools.ant.BuildException
- in case an error occuredpublic void execute() throws org.apache.tools.ant.BuildException
execute
in class org.apache.tools.ant.Task
org.apache.tools.ant.BuildException
- if an error occured
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |