org.springframework.aws.ivy
Class S3Repository

java.lang.Object
  extended by org.apache.ivy.plugins.repository.AbstractRepository
      extended by org.springframework.aws.ivy.S3Repository
All Implemented Interfaces:
org.apache.ivy.plugins.repository.Repository

public class S3Repository
extends org.apache.ivy.plugins.repository.AbstractRepository

A repository the allows you to upload and download from an S3 repository.

Author:
Ben Hale

Field Summary
private  java.lang.String accessKey
           
private  java.util.Map<java.lang.String,S3Resource> resourceCache
           
private  java.lang.String secretKey
           
private  org.jets3t.service.S3Service service
           
 
Constructor Summary
S3Repository()
           
 
Method Summary
private  void buildDestinationPath(org.jets3t.service.model.S3Bucket bucket, java.lang.String destination)
           
 void get(java.lang.String source, java.io.File destination)
           
private  org.jets3t.service.security.AWSCredentials getCredentials()
           
private  java.lang.String getDestinationPath(java.lang.String destination)
           
 org.apache.ivy.plugins.repository.Resource getResource(java.lang.String source)
           
private  org.jets3t.service.S3Service getService()
           
 java.util.List<java.lang.String> list(java.lang.String parent)
           
protected  void put(java.io.File source, java.lang.String destination, boolean overwrite)
           
 void setAccessKey(java.lang.String accessKey)
           
 void setSecretKey(java.lang.String secretKey)
           
 
Methods inherited from class org.apache.ivy.plugins.repository.AbstractRepository
addTransferListener, fireTransferCompleted, fireTransferCompleted, fireTransferError, fireTransferError, fireTransferEvent, fireTransferInitiated, fireTransferProgress, fireTransferStarted, fireTransferStarted, getFileSeparator, getName, hasTransferListener, put, removeTransferListener, setName, standardize, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

accessKey

private java.lang.String accessKey

secretKey

private java.lang.String secretKey

service

private org.jets3t.service.S3Service service

resourceCache

private java.util.Map<java.lang.String,S3Resource> resourceCache
Constructor Detail

S3Repository

public S3Repository()
Method Detail

setAccessKey

public void setAccessKey(java.lang.String accessKey)

setSecretKey

public void setSecretKey(java.lang.String secretKey)

get

public void get(java.lang.String source,
                java.io.File destination)
         throws java.io.IOException
Throws:
java.io.IOException

getResource

public org.apache.ivy.plugins.repository.Resource getResource(java.lang.String source)
                                                       throws java.io.IOException
Throws:
java.io.IOException

list

public java.util.List<java.lang.String> list(java.lang.String parent)
                                      throws java.io.IOException
Throws:
java.io.IOException

put

protected void put(java.io.File source,
                   java.lang.String destination,
                   boolean overwrite)
            throws java.io.IOException
Overrides:
put in class org.apache.ivy.plugins.repository.AbstractRepository
Throws:
java.io.IOException

getService

private org.jets3t.service.S3Service getService()

getCredentials

private org.jets3t.service.security.AWSCredentials getCredentials()

buildDestinationPath

private void buildDestinationPath(org.jets3t.service.model.S3Bucket bucket,
                                  java.lang.String destination)

getDestinationPath

private java.lang.String getDestinationPath(java.lang.String destination)