|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.build.aws.ant.AbstractS3Operation
org.springframework.build.aws.ant.Upload
public class Upload
A member of the S3 ANT task for dealing with Amazon S3 upload behavior. This operation will use the credentials setup in its parent S3 task tag.
Field Summary | |
---|---|
private java.io.File |
file
|
private java.util.List<org.apache.tools.ant.types.FileSet> |
fileSets
|
private java.util.Set<Metadata> |
metadatas
|
private boolean |
publicRead
|
private java.lang.String |
toDir
|
private java.lang.String |
toFile
|
Fields inherited from class org.springframework.build.aws.ant.AbstractS3Operation |
---|
bucketName, project |
Constructor Summary | |
---|---|
Upload()
|
Method Summary | |
---|---|
void |
addFileSet(org.apache.tools.ant.types.FileSet fileSet)
Adds an optional fileSet to read files from. |
void |
addMetadata(Metadata metadata)
Adds an optional piece of |
private void |
buildDestinationPath(org.jets3t.service.S3Service service,
org.jets3t.service.model.S3Bucket bucket,
java.lang.String destination)
|
void |
execute(org.jets3t.service.S3Service service)
Execute an S3 operation |
private java.lang.String |
getDestinationPath(java.lang.String destination)
|
void |
init()
Verify that required parameters have been set |
private void |
logEnd(java.io.File source,
long startTime,
long endTime)
|
private void |
logStart(java.io.File source,
org.jets3t.service.model.S3Object destination)
|
private void |
processFileToDir(org.jets3t.service.S3Service service)
|
private void |
processFileToFile(org.jets3t.service.S3Service service)
|
private void |
processSetToDir(org.jets3t.service.S3Service service)
|
private void |
putFile(org.jets3t.service.S3Service service,
org.jets3t.service.model.S3Bucket bucket,
java.io.File source,
java.lang.String key)
|
void |
setFile(java.io.File file)
Optional parameter that corresponds to the file to upload |
void |
setPublicRead(boolean publicRead)
Optional parameter that corresponds to public readability of the object in S3. |
void |
setToDir(java.lang.String toDir)
Optional parameter that corresponds to the target object 'directory' in S3 |
void |
setToFile(java.lang.String toFile)
Optional parameter that corresponds to the target object key in S3 |
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 |
---|
private java.io.File file
private java.util.List<org.apache.tools.ant.types.FileSet> fileSets
private java.lang.String toDir
private java.lang.String toFile
private boolean publicRead
private java.util.Set<Metadata> metadatas
Constructor Detail |
---|
public Upload()
Method Detail |
---|
public void setFile(java.io.File file)
file
- The file to uploadpublic void addFileSet(org.apache.tools.ant.types.FileSet fileSet)
fileSet
- The set of files to uploadpublic void addMetadata(Metadata metadata)
property
- public void setToDir(java.lang.String toDir)
toDir
- The target object 'directory' in S3public void setToFile(java.lang.String toFile)
toFile
- The target object key in S3public void setPublicRead(boolean publicRead)
publicRead
- public void init()
public void execute(org.jets3t.service.S3Service service) throws org.jets3t.service.S3ServiceException, java.io.IOException
S3Operation
service
- The S3 Service to execute against
org.jets3t.service.S3ServiceException
java.io.IOException
private void processFileToFile(org.jets3t.service.S3Service service) throws org.jets3t.service.S3ServiceException, java.io.IOException
org.jets3t.service.S3ServiceException
java.io.IOException
private void processFileToDir(org.jets3t.service.S3Service service) throws org.jets3t.service.S3ServiceException, java.io.IOException
org.jets3t.service.S3ServiceException
java.io.IOException
private void processSetToDir(org.jets3t.service.S3Service service) throws org.jets3t.service.S3ServiceException, java.io.IOException
org.jets3t.service.S3ServiceException
java.io.IOException
private void putFile(org.jets3t.service.S3Service service, org.jets3t.service.model.S3Bucket bucket, java.io.File source, java.lang.String key) throws org.jets3t.service.S3ServiceException, java.io.IOException
org.jets3t.service.S3ServiceException
java.io.IOException
private java.lang.String getDestinationPath(java.lang.String destination)
private void buildDestinationPath(org.jets3t.service.S3Service service, org.jets3t.service.model.S3Bucket bucket, java.lang.String destination) throws org.jets3t.service.S3ServiceException
org.jets3t.service.S3ServiceException
private void logStart(java.io.File source, org.jets3t.service.model.S3Object destination) throws java.io.IOException
java.io.IOException
private void logEnd(java.io.File source, long startTime, long endTime)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |