org.apache.maven.wagon
Interface Wagon

All Known Subinterfaces:
CommandExecutor
All Known Implementing Classes:
AbstractWagon, StreamWagon

public interface Wagon


Field Summary
static java.lang.String ROLE
           
 
Method Summary
 void addSessionListener(SessionListener listener)
           
 void addTransferListener(TransferListener listener)
           
 void connect(Repository source)
           
 void connect(Repository source, AuthenticationInfo authenticationInfo)
           
 void connect(Repository source, AuthenticationInfo authenticationInfo, ProxyInfo proxyInfo)
           
 void connect(Repository source, ProxyInfo proxyInfo)
           
 void disconnect()
           
 void get(java.lang.String resourceName, java.io.File destination)
          Downloads specified resource from the repository to given file.
 java.util.List getFileList(java.lang.String destinationDirectory)
           Returns a List of strings naming the files and directories in the directory denoted by this abstract pathname.
 boolean getIfNewer(java.lang.String resourceName, java.io.File destination, long timestamp)
          Downloads specified resource from the repository if it was modfified since specified date.
 Repository getRepository()
           
 boolean hasSessionListener(SessionListener listener)
           
 boolean hasTransferListener(TransferListener listener)
           
 boolean isInteractive()
           
 void openConnection()
           
 void put(java.io.File source, java.lang.String destination)
          Copy a file from local system to remote
 void putDirectory(java.io.File sourceDirectory, java.lang.String destinationDirectory)
          Copy a directory from local system to remote
 void removeSessionListener(SessionListener listener)
           
 void removeTransferListener(TransferListener listener)
           
 boolean resourceExists(java.lang.String resourceName)
          Check if a remote resource exists
 void setInteractive(boolean interactive)
           
 boolean supportsDirectoryCopy()
           
 

Field Detail

ROLE

static final java.lang.String ROLE
Method Detail

get

void get(java.lang.String resourceName,
         java.io.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(java.lang.String resourceName,
                   java.io.File destination,
                   long timestamp)
                   throws TransferFailedException,
                          ResourceDoesNotExistException,
                          AuthorizationException
Downloads specified resource from the repository if it was modfified since specified date. The date is measured in milliseconds, between the current time and midnight, January 1, 1970 UTC and aliged 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(java.io.File source,
         java.lang.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(java.io.File sourceDirectory,
                  java.lang.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(java.lang.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

java.util.List getFileList(java.lang.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()
Returns:
whether if this wagon supports directory operations

getRepository

Repository getRepository()

connect

void connect(Repository source)
             throws ConnectionException,
                    AuthenticationException
Throws:
ConnectionException
AuthenticationException

connect

void connect(Repository source,
             ProxyInfo proxyInfo)
             throws ConnectionException,
                    AuthenticationException
Throws:
ConnectionException
AuthenticationException

connect

void connect(Repository source,
             AuthenticationInfo authenticationInfo)
             throws ConnectionException,
                    AuthenticationException
Throws:
ConnectionException
AuthenticationException

connect

void connect(Repository source,
             AuthenticationInfo authenticationInfo,
             ProxyInfo proxyInfo)
             throws ConnectionException,
                    AuthenticationException
Throws:
ConnectionException
AuthenticationException

openConnection

void openConnection()
                    throws ConnectionException,
                           AuthenticationException
Throws:
ConnectionException
AuthenticationException

disconnect

void disconnect()
                throws ConnectionException
Throws:
ConnectionException

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)