org.springframework.build.aws.ant
Class Delete
java.lang.Object
org.springframework.build.aws.ant.AbstractS3Operation
org.springframework.build.aws.ant.Delete
- All Implemented Interfaces:
- S3Operation
public class Delete
- extends AbstractS3Operation
A member of the S3 ANT task for dealing with Amazon S3 delete behavior. This
operation will use the credentials setup in its parent S3 task tag.
- Author:
- Ben Hale
Field Summary |
private java.lang.String |
file
|
private java.util.List<org.apache.tools.ant.types.FileSet> |
fileSets
|
Method Summary |
void |
addFileSet(org.apache.tools.ant.types.FileSet fileSet)
Adds an optional fileSet to read delete from. |
private void |
deleteFile(org.jets3t.service.S3Service service,
org.jets3t.service.model.S3Bucket bucket,
java.lang.String key)
|
void |
execute(org.jets3t.service.S3Service service)
Execute an S3 operation |
void |
init()
Verify that required parameters have been set |
private void |
processFile(org.jets3t.service.S3Service service)
|
private void |
processSet(org.jets3t.service.S3Service service)
|
void |
setFile(java.lang.String file)
Optional parameter that corresponds to the source object key in S3 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
file
private java.lang.String file
fileSets
private java.util.List<org.apache.tools.ant.types.FileSet> fileSets
Delete
public Delete()
setFile
public void setFile(java.lang.String file)
- Optional parameter that corresponds to the source object key in S3
- Parameters:
file
- The source object key in S3
addFileSet
public void addFileSet(org.apache.tools.ant.types.FileSet fileSet)
- Adds an optional fileSet to read delete from.
- Parameters:
fileSet
- The set of files to delete
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
processFile
private void processFile(org.jets3t.service.S3Service service)
throws org.jets3t.service.S3ServiceException
- Throws:
org.jets3t.service.S3ServiceException
processSet
private void processSet(org.jets3t.service.S3Service service)
throws java.io.IOException,
org.jets3t.service.S3ServiceException
- Throws:
java.io.IOException
org.jets3t.service.S3ServiceException
deleteFile
private void deleteFile(org.jets3t.service.S3Service service,
org.jets3t.service.model.S3Bucket bucket,
java.lang.String key)
throws org.jets3t.service.S3ServiceException
- Throws:
org.jets3t.service.S3ServiceException