org.apache.maven.wagon
Interface Wagon

All Known Subinterfaces:
CommandExecutor, SshWagon, StreamingWagon
All Known Implementing Classes:
AbstractHttpClientWagon, AbstractJschWagon, AbstractWagon, FileWagon, FtpWagon, HttpWagon, LightweightHttpsWagon, LightweightHttpWagon, ScmWagon, ScpCommandExecutor, ScpExternalCommandExecutor, ScpExternalWagon, ScpWagon, SftpWagon, StreamWagon, WebDavWagon

public interface Wagon


Field Summary
static String ROLE
           
 
Method Summary
 void addSessionListener(SessionListener listener)
           
 void addTransferListener(TransferListener listener)
           
 void connect(Repository source)
          Initiate the connection to the repository.
 void connect(Repository source, AuthenticationInfo authenticationInfo)
          Initiate the connection to the repository.
 void connect(Repository source, AuthenticationInfo authenticationInfo, ProxyInfo proxyInfo)
          Initiate the connection to the repository.
 void connect(Repository source, AuthenticationInfo authenticationInfo, ProxyInfoProvider proxyInfoProvider)
          Initiate the connection to the repository.
 void connect(Repository source, ProxyInfo proxyInfo)
          Initiate the connection to the repository.
 void connect(Repository source, ProxyInfoProvider proxyInfoProvider)
          Initiate the connection to the repository.
 void disconnect()
          Disconnect from the repository.
 void get(String resourceName, File destination)
          Downloads specified resource from the repository to given file.
 List<String> getFileList(String destinationDirectory)
          

Returns a List of strings naming the files and directories in the directory denoted by this abstract pathname.

 boolean getIfNewer(String resourceName, File destination, long timestamp)
          Downloads specified resource from the repository if it was modified since specified date.
 Repository getRepository()
           
 int getTimeout()
          Get the connection timeout limit in milliseconds
 boolean hasSessionListener(SessionListener listener)
           
 boolean hasTransferListener(TransferListener listener)
           
 boolean isInteractive()
           
 void openConnection()
          Deprecated. connect using the connect(org.apache.maven.wagon.repository.Repository) or related methods - this is an internal method
 void put(File source, String destination)
          Copy a file from local system to remote
 void putDirectory(File sourceDirectory, String destinationDirectory)
          Copy a directory from local system to remote
 void removeSessionListener(SessionListener listener)
           
 void removeTransferListener(TransferListener listener)
           
 boolean resourceExists(String resourceName)
          Check if a remote resource exists
 void setInteractive(boolean interactive)
           
 void setTimeout(int timeoutValue)
          Set the connection timeout limit in milliseconds
 boolean supportsDirectoryCopy()
          Flag indicating if this wagon supports directory copy operations.
 

Field Detail

ROLE

static final String ROLE
Method Detail

get

void get(String resourceName,
         File destination)
         throws TransferFailedException,
                ResourceDoesNotExistException,
                AuthorizationException
Downloads specified resource from the repository to given file.

Parameters:
resourceName -
destination -
Throws:
TransferFailedException
ResourceDoesNotExistException
AuthorizationException

getIfNewer

boolean getIfNewer(String resourceName,
                   File destination,
                   long timestamp)
                   throws TransferFailedException,
                          ResourceDoesNotExistException,
                          AuthorizationException
Downloads specified resource from the repository if it was modified since specified date. The date is measured in milliseconds, between the current time and midnight, January 1, 1970 UTC and aligned to GMT timezone.

Parameters:
resourceName -
destination -
timestamp -
Returns:
true if newer resource has been downloaded, false if resource in the repository is older or has the same age.
Throws:
TransferFailedException
ResourceDoesNotExistException
AuthorizationException

put

void put(File source,
         String destination)
         throws TransferFailedException,
                ResourceDoesNotExistException,
                AuthorizationException
Copy a file from local system to remote

Parameters:
source - the local file
destination - the remote destination
Throws:
TransferFailedException
ResourceDoesNotExistException
AuthorizationException

putDirectory

void putDirectory(File sourceDirectory,
                  String destinationDirectory)
                  throws TransferFailedException,
                         ResourceDoesNotExistException,
                         AuthorizationException
Copy a directory from local system to remote

Parameters:
sourceDirectory - the local directory
destinationDirectory - the remote destination
Throws:
TransferFailedException
ResourceDoesNotExistException
AuthorizationException

resourceExists

boolean resourceExists(String resourceName)
                       throws TransferFailedException,
                              AuthorizationException
Check if a remote resource exists

Parameters:
resourceName -
Returns:
whether the resource exists or not
Throws:
TransferFailedException - if there's an error trying to access the remote side
AuthorizationException - if not authorized to verify the existence of the resource

getFileList

List<String> getFileList(String destinationDirectory)
                         throws TransferFailedException,
                                ResourceDoesNotExistException,
                                AuthorizationException

Returns a List of strings naming the files and directories in the directory denoted by this abstract pathname.

If this abstract pathname does not denote a directory, or does not exist, then this method throws ResourceDoesNotExistException. Otherwise a List of strings is returned, one for each file or directory in the directory. Names denoting the directory itself and the directory's parent directory are not included in the result. Each string is a file name rather than a complete path.

There is no guarantee that the name strings in the resulting list will appear in any specific order; they are not, in particular, guaranteed to appear in alphabetical order.

Parameters:
destinationDirectory - directory to list contents of
Returns:
A List of strings naming the files and directories in the directory denoted by this abstract pathname. The List will be empty if the directory is empty.
Throws:
TransferFailedException - if there's an error trying to access the remote side
ResourceDoesNotExistException - if destinationDirectory does not exist or is not a directory
AuthorizationException - if not authorized to list the contents of the directory

supportsDirectoryCopy

boolean supportsDirectoryCopy()
Flag indicating if this wagon supports directory copy operations.

Returns:
whether if this wagon supports directory operations

getRepository

Repository getRepository()

connect

void connect(Repository source)
             throws ConnectionException,
                    AuthenticationException
Initiate the connection to the repository.

Parameters:
source - the repository to connect to
Throws:
ConnectionException - if there is a problem connecting
AuthenticationException - if the credentials for connecting are not sufficient

connect

void connect(Repository source,
             ProxyInfo proxyInfo)
             throws ConnectionException,
                    AuthenticationException
Initiate the connection to the repository.

Parameters:
source - the repository to connect to
Throws:
ConnectionException - if there is a problem connecting
AuthenticationException - if the credentials for connecting are not sufficient

connect

void connect(Repository source,
             ProxyInfoProvider proxyInfoProvider)
             throws ConnectionException,
                    AuthenticationException
Initiate the connection to the repository.

Parameters:
source - the repository to connect to
proxyInfoProvider - the provider to obtain a network proxy to use to connect to the remote repository
Throws:
ConnectionException - if there is a problem connecting
AuthenticationException - if the credentials for connecting are not sufficient

connect

void connect(Repository source,
             AuthenticationInfo authenticationInfo)
             throws ConnectionException,
                    AuthenticationException
Initiate the connection to the repository.

Parameters:
source - the repository to connect to
authenticationInfo - authentication credentials for connecting
Throws:
ConnectionException - if there is a problem connecting
AuthenticationException - if the credentials for connecting are not sufficient

connect

void connect(Repository source,
             AuthenticationInfo authenticationInfo,
             ProxyInfo proxyInfo)
             throws ConnectionException,
                    AuthenticationException
Initiate the connection to the repository.

Parameters:
source - the repository to connect to
authenticationInfo - authentication credentials for connecting
proxyInfo - the network proxy to use to connect to the remote repository
Throws:
ConnectionException - if there is a problem connecting
AuthenticationException - if the credentials for connecting are not sufficient

connect

void connect(Repository source,
             AuthenticationInfo authenticationInfo,
             ProxyInfoProvider proxyInfoProvider)
             throws ConnectionException,
                    AuthenticationException
Initiate the connection to the repository.

Parameters:
source - the repository to connect to
authenticationInfo - authentication credentials for connecting
proxyInfoProvider - the provider to obtain a network proxy to use to connect to the remote repository
Throws:
ConnectionException - if there is a problem connecting
AuthenticationException - if the credentials for connecting are not sufficient

openConnection

void openConnection()
                    throws ConnectionException,
                           AuthenticationException
Deprecated. connect using the connect(org.apache.maven.wagon.repository.Repository) or related methods - this is an internal method

Initiate the connection to the repository.

Throws:
ConnectionException - if there is a problem connecting
AuthenticationException - if ther credentials for connecting are not sufficient

disconnect

void disconnect()
                throws ConnectionException
Disconnect from the repository.

Throws:
ConnectionException - if there is a problem disconnecting

setTimeout

void setTimeout(int timeoutValue)
Set the connection timeout limit in milliseconds


getTimeout

int getTimeout()
Get the connection timeout limit in milliseconds


addSessionListener

void addSessionListener(SessionListener listener)

removeSessionListener

void removeSessionListener(SessionListener listener)

hasSessionListener

boolean hasSessionListener(SessionListener listener)

addTransferListener

void addTransferListener(TransferListener listener)

removeTransferListener

void removeTransferListener(TransferListener listener)

hasTransferListener

boolean hasTransferListener(TransferListener listener)

isInteractive

boolean isInteractive()

setInteractive

void setInteractive(boolean interactive)


Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.