net.dpml.tools.tasks
Class GenericTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by net.dpml.tools.tasks.GenericTask
Direct Known Subclasses:
BuildTask, CleanTask, DocTask, InitializationTask, InstallTask, JarTask, JUnitTestTask, ModuleTask, PackageTask, PartsDataType, PartTask, PrepareTask, ReplicateTask, ResourceTask, RMICTask, StateTask, TestTask, TypeBuilderTask, TypesTask

public class GenericTask
extends Task

Prepare the target build directory based on content presented under the ${basedir}/src and ${basedir}/etc directories.

Version:
1.1.3
Author:
Digital Product Meta Library

Field Summary
static String ASC_EXT
          ASC file type.
static String GPG_EXE_KEY
          Constant key for the GPG exe name.
static String MD5_EXT
          MD5 file type.
 
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
GenericTask()
           
 
Method Summary
 void asc(File file)
          Creation of an ASC signature relative to a supplied file.
 void checksum(File file)
          Create an MD5 checksum file relative to the supplied file.
protected  void copy(File src, File destination, boolean filtering, String includes, String excludes)
          Utility operation to copy a file from a source to a destination.
protected  void deleteDir(File dir)
          Utility operation to delete a directory .
 Context getContext()
          Get the project context.
protected  Library getLibrary()
          Get the library.
protected  Resource getResource()
          Get the project definition.
 void init()
          Initialize the task.
protected  boolean isInitialized()
          Return the initialized state of the task.
protected  void mkDir(File dir)
          Utility operation to create a new directory if it does not exist.
 
Methods inherited from class org.apache.tools.ant.Task
execute, getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, 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

GPG_EXE_KEY

public static final String GPG_EXE_KEY
Constant key for the GPG exe name.

See Also:
Constant Field Values

MD5_EXT

public static final String MD5_EXT
MD5 file type.

See Also:
Constant Field Values

ASC_EXT

public static final String ASC_EXT
ASC file type.

See Also:
Constant Field Values
Constructor Detail

GenericTask

public GenericTask()
Method Detail

init

public void init()
Initialize the task.

Overrides:
init in class Task

isInitialized

protected boolean isInitialized()
Return the initialized state of the task.

Returns:
true if initialized

getResource

protected Resource getResource()
Get the project definition.

Returns:
the resource

getLibrary

protected Library getLibrary()
Get the library.

Returns:
the library

getContext

public Context getContext()
Get the project context.

Returns:
the project context

mkDir

protected void mkDir(File dir)
Utility operation to create a new directory if it does not exist.

Parameters:
dir - the directory to create

copy

protected void copy(File src,
                    File destination,
                    boolean filtering,
                    String includes,
                    String excludes)
Utility operation to copy a file from a source to a destination.

Parameters:
src - the src file
destination - the destination file
filtering - if true apply filtering during the copy
includes - the includes specification
excludes - the excludes specification

deleteDir

protected void deleteDir(File dir)
Utility operation to delete a directory .

Parameters:
dir - the directory to delete

checksum

public void checksum(File file)
Create an MD5 checksum file relative to the supplied file. If an [filename].md5 file exists it will be deleted and a new MD5 created.

Parameters:
file - the file from which a checksum signature will be generated

asc

public void asc(File file)
Creation of an ASC signature relative to a supplied file. If a [filename].asc exists it will be deleted and recreated relative to the supplied file content.

Parameters:
file - the file to sign