org.springframework.build.aws.ant
Class DownloadLatest

java.lang.Object
  extended by org.springframework.build.aws.ant.AbstractS3Operation
      extended by org.springframework.build.aws.ant.AbstractS3DownloadOperation
          extended by org.springframework.build.aws.ant.DownloadLatest
All Implemented Interfaces:
S3Operation

public class DownloadLatest
extends AbstractS3DownloadOperation

A member of the S3 ANT task for dealing with Amazon S3 download behavior. This operation will use the credentials setup in its parent S3 task tag and download the latest matching file.

Author:
Ben Hale

Field Summary
private  java.util.List<org.apache.tools.ant.types.FileSet> fileSets
           
private  java.io.File toDir
           
 
Fields inherited from class org.springframework.build.aws.ant.AbstractS3Operation
bucketName, project
 
Constructor Summary
DownloadLatest()
           
 
Method Summary
 void addFileSet(org.apache.tools.ant.types.FileSet fileSet)
          Adds an optional fileSet to read files from.
 void execute(org.jets3t.service.S3Service service)
          Execute an S3 operation
 void init()
          Verify that required parameters have been set
private  void processSetToDir(org.jets3t.service.S3Service service)
           
 void setToDir(java.io.File toDir)
          Optional parameter that corresponds to the target object directory
 
Methods inherited from class org.springframework.build.aws.ant.AbstractS3DownloadOperation
getFile
 
Methods inherited from class org.springframework.build.aws.ant.AbstractS3Operation
getOperationBucket, getS3SafeDirectory, getS3Scanner, setBucketName, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fileSets

private java.util.List<org.apache.tools.ant.types.FileSet> fileSets

toDir

private java.io.File toDir
Constructor Detail

DownloadLatest

public DownloadLatest()
Method Detail

addFileSet

public void addFileSet(org.apache.tools.ant.types.FileSet fileSet)
Adds an optional fileSet to read files from.

Parameters:
fileSet - The set of files to download

setToDir

public void setToDir(java.io.File toDir)
Optional parameter that corresponds to the target object directory

Parameters:
toDir - The target object directory

init

public void init()
Verify that required parameters have been set


execute

public void execute(org.jets3t.service.S3Service service)
             throws org.jets3t.service.S3ServiceException,
                    java.io.IOException
Description copied from interface: S3Operation
Execute an S3 operation

Parameters:
service - The S3 Service to execute against
Throws:
org.jets3t.service.S3ServiceException
java.io.IOException

processSetToDir

private void processSetToDir(org.jets3t.service.S3Service service)
                      throws org.jets3t.service.S3ServiceException,
                             java.io.IOException
Throws:
org.jets3t.service.S3ServiceException
java.io.IOException