public class SimpleStorageServiceWagon extends AbstractWagon
s3://bucket.name
. As an example
s3://static.springframework.org
would put files into the
static.springframework.org
bucket on the S3 service. This
implementation uses the username
and passphrase
portions of the server authentication metadata for credentials.Constructor and Description |
---|
SimpleStorageServiceWagon() |
Modifier and Type | Method and Description |
---|---|
protected void |
connectToRepository(org.apache.maven.wagon.repository.Repository source,
org.apache.maven.wagon.authentication.AuthenticationInfo authenticationInfo,
org.apache.maven.wagon.proxy.ProxyInfoProvider proxyInfoProvider)
Subclass must implement with specific connection behavior
|
protected void |
disconnectFromRepository()
Subclasses must implement with specific disconnection behavior
|
protected boolean |
doesRemoteResourceExist(String resourceName)
Subclass must implement with specific detection behavior
|
protected void |
getResource(String resourceName,
File destination,
org.springframework.aws.maven.TransferProgress progress)
Subclass must implement with specific get behavior
|
protected boolean |
isRemoteResourceNewer(String resourceName,
long timestamp)
Subclass must implement with newer detection behavior
|
protected List<String> |
listDirectory(String directory)
Subclass must implement with specific directory listing behavior
|
protected void |
putResource(File source,
String destination,
org.springframework.aws.maven.TransferProgress progress)
Subclasses must implement with specific put behavior
|
addSessionListener, addTransferListener, connect, connect, connect, connect, connect, connect, disconnect, get, getFileList, getIfNewer, getRepository, getSessionListeners, getTimeout, getTransferListeners, hasSessionListener, hasTransferListener, isInteractive, openConnection, put, putDirectory, removeSessionListener, removeTransferListener, resourceExists, setInteractive, setTimeout, supportsDirectoryCopy
protected void connectToRepository(org.apache.maven.wagon.repository.Repository source, org.apache.maven.wagon.authentication.AuthenticationInfo authenticationInfo, org.apache.maven.wagon.proxy.ProxyInfoProvider proxyInfoProvider) throws org.apache.maven.wagon.authentication.AuthenticationException
AbstractWagon
connectToRepository
in class AbstractWagon
source
- The repository connection informationauthenticationInfo
- Authentication information, if anyproxyInfoProvider
- Proxy information, if anyorg.apache.maven.wagon.authentication.AuthenticationException
protected boolean doesRemoteResourceExist(String resourceName)
AbstractWagon
doesRemoteResourceExist
in class AbstractWagon
resourceName
- The remote resource to detectprotected void disconnectFromRepository()
AbstractWagon
disconnectFromRepository
in class AbstractWagon
protected void getResource(String resourceName, File destination, org.springframework.aws.maven.TransferProgress progress) throws org.apache.maven.wagon.ResourceDoesNotExistException, org.jets3t.service.S3ServiceException, IOException
AbstractWagon
getResource
in class AbstractWagon
resourceName
- The name of the remote resource to readdestination
- The local file to write toprogress
- A progress notifier for the upload. It must be used or
hashes will not be calculated correctlyorg.apache.maven.wagon.ResourceDoesNotExistException
org.jets3t.service.S3ServiceException
IOException
protected boolean isRemoteResourceNewer(String resourceName, long timestamp) throws org.jets3t.service.S3ServiceException
AbstractWagon
isRemoteResourceNewer
in class AbstractWagon
resourceName
- The name of the resource being comparedtimestamp
- The timestamp to compare againstorg.jets3t.service.S3ServiceException
protected List<String> listDirectory(String directory) throws Exception
AbstractWagon
listDirectory
in class AbstractWagon
directory
- The directory to list files inException
- Implementations can throw any exception and it will be
handled by the base classprotected void putResource(File source, String destination, org.springframework.aws.maven.TransferProgress progress) throws org.jets3t.service.S3ServiceException, IOException
AbstractWagon
putResource
in class AbstractWagon
source
- The local source file to read fromdestination
- The name of the remote resource to write toprogress
- A progress notifier for the upload. It must be used or
hashes will not be calculated correctlyorg.jets3t.service.S3ServiceException
IOException
Copyright © 2007-2012 Spring Framework. All Rights Reserved.