org.springframework.build.aws.ant
Class SimpleStorageService

java.lang.Object
  extended by org.springframework.build.aws.ant.SimpleStorageService

public class SimpleStorageService
extends java.lang.Object

An ANT task for dealing with the Amazon S3 service. Requires properties to be set for an accessKey and a secretKey. S3 operations are listed as elements contained in the s3 tag.

 <aws:s3 accessKey="${s3.accessKey}" secretKey="${s3.secretKey}">
         <upload bucketName="static.springframework.org"
                 file="${target.release.dir}/${release-with-dependencies.zip}"
                 toFile="SPR/spring-framework-${spring-version}-with-dependencies-${tstamp}-${build.number}.zip"
                 publicRead="true"/>
         <upload bucketName="static.springframework.org"
                 file="${target.release.dir}/${release.zip}"
                 toFile="SPR/spring-framework-${spring-version}-${tstamp}-${build.number}.zip"
                 publicRead="true"/>
 </aws:s3>
 

Author:
Ben Hale

Field Summary
private  java.lang.String accessKey
           
private  java.util.List<S3Operation> operations
           
private  java.lang.String secretKey
           
 
Constructor Summary
SimpleStorageService()
           
 
Method Summary
 void addConfiguredDelete(Delete delete)
          Add any delete operations
 void addConfiguredDownload(Download download)
          Add any download operations
 void addConfiguredDownloadLatest(DownloadLatest downloadLatest)
          Add any downloadLatest operations
 void addConfiguredUpload(Upload upload)
          Add any upload operations
 void execute()
          Run all S3 operations configured as part of this task
 void setAccessKey(java.lang.String accessKey)
          Required parameter that corresponds to the S3 Access Key
 void setSecretKey(java.lang.String secretKey)
          Required parameter that corresponds to the S3 Secret Key
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

accessKey

private java.lang.String accessKey

secretKey

private java.lang.String secretKey

operations

private java.util.List<S3Operation> operations
Constructor Detail

SimpleStorageService

public SimpleStorageService()
Method Detail

setAccessKey

public void setAccessKey(java.lang.String accessKey)
Required parameter that corresponds to the S3 Access Key

Parameters:
accessKey - The S3 Access Key

setSecretKey

public void setSecretKey(java.lang.String secretKey)
Required parameter that corresponds to the S3 Secret Key

Parameters:
secretKey - The S3 Secret Key

addConfiguredUpload

public void addConfiguredUpload(Upload upload)
Add any upload operations

Parameters:
upload - The upload operation metadata

addConfiguredDownload

public void addConfiguredDownload(Download download)
Add any download operations

Parameters:
download - The download operation metadata

addConfiguredDownloadLatest

public void addConfiguredDownloadLatest(DownloadLatest downloadLatest)
Add any downloadLatest operations

Parameters:
download - The downloadLatest operation metadata

addConfiguredDelete

public void addConfiguredDelete(Delete delete)
Add any delete operations

Parameters:
delete - The delete operation metadata

execute

public void execute()
Run all S3 operations configured as part of this task