at.spardat.xma.boot.antext
Class CopyWithDeltas

java.lang.Object
  extended byorg.apache.tools.ant.ProjectComponent
      extended byorg.apache.tools.ant.Task
          extended byat.spardat.xma.boot.antext.CopyWithDeltas
All Implemented Interfaces:
java.lang.Cloneable

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

Ant Task to copy a specified file together with its delta files to previous versions into a specified target directory. If there allready exists the same files in the target directory, only files with newer timestamps are copied.


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
CopyWithDeltas()
          Default constructor needed by Ant.
 
Method Summary
 void execute()
          Copies the specified file together with its delta files to previous versions into the specified target directory.
 void setFile(java.io.File file)
          Set the File to copy.
 void setMinVersion(java.lang.String minVersion)
          Set the minimal version for delta files to copy.
 void setPreservelastmodified(boolean preservelastmodified)
          Set if the modification timestamp of the copied files remains unchanged.
 void setToDir(java.io.File toDir)
          Set the target directory for the copies.
 
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

CopyWithDeltas

public CopyWithDeltas()
Default constructor needed by Ant.

Method Detail

setFile

public void setFile(java.io.File file)
Set the File to copy. This file is copied together with all delta versions of this file found in the same directory. The filename should contain a version number. If the filename does not contain a version number, no delta versions will be found or copied.

Parameters:
file - to copy together with is delta files from previous versions.

setMinVersion

public void setMinVersion(java.lang.String minVersion)
Set the minimal version for delta files to copy. Delta files from older versions will not be copied. Optional, default is 0.0.0

Parameters:
minVersion - minimal version to copy

setToDir

public void setToDir(java.io.File toDir)
Set the target directory for the copies. The file and its delta versions are copied to this directory.

Parameters:
toDir - the target directory

setPreservelastmodified

public void setPreservelastmodified(boolean preservelastmodified)
Set if the modification timestamp of the copied files remains unchanged. Optional, default is true.

Parameters:
preservelastmodified - If true the modification time is not changed.
If false the modification timestamp is set to the current data and time.

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Copies the specified file together with its delta files to previous versions into the specified target directory.

Throws:
org.apache.tools.ant.BuildException