org.apache.maven.wagon.providers.ftp
Class FtpWagon

java.lang.Object
  extended by org.apache.maven.wagon.AbstractWagon
      extended by org.apache.maven.wagon.StreamWagon
          extended by org.apache.maven.wagon.providers.ftp.FtpWagon
All Implemented Interfaces:
StreamingWagon, Wagon

public class FtpWagon
extends StreamWagon

FtpWagon

Version:
$Id: FtpWagon.java 1174106 2011-09-22 13:04:11Z olamy $
Plexus component:
role-hint:
"ftp"
instantiation-strategy:
"per-lookup"
role:
"org.apache.maven.wagon.Wagon"

Nested Class Summary
 class FtpWagon.PrintCommandListener
           
 
Field Summary
 
Fields inherited from class org.apache.maven.wagon.AbstractWagon
authenticationInfo, DEFAULT_BUFFER_SIZE, interactive, proxyInfo, repository, sessionEventSupport, transferEventSupport
 
Fields inherited from interface org.apache.maven.wagon.Wagon
DEFAULT_CONNECTION_TIMEOUT, DEFAULT_READ_TIMEOUT, ROLE
 
Constructor Summary
FtpWagon()
           
 
Method Summary
 void closeConnection()
           
 void fillInputData(InputData inputData)
           
 void fillOutputData(OutputData outputData)
           
protected  void fireGetCompleted(Resource resource, File localFile)
           
protected  void firePutCompleted(Resource resource, File file)
           
protected  void fireSessionDebug(String msg)
           
 String getControlEncoding()
           
 List<String> getFileList(String destinationDirectory)
          

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

 boolean isPassiveMode()
           
protected  void openConnectionInternal()
           
 void putDirectory(File sourceDirectory, String destinationDirectory)
          Copy a directory from local system to remote
 boolean resourceExists(String resourceName)
          Check if a remote resource exists
 void setControlEncoding(String controlEncoding)
           
 void setPassiveMode(boolean passiveMode)
           
 boolean supportsDirectoryCopy()
          Flag indicating if this wagon supports directory copy operations.
 
Methods inherited from class org.apache.maven.wagon.StreamWagon
checkInputStream, checkOutputStream, get, getIfNewer, getIfNewerToStream, getInputStream, getOutputStream, getToStream, put, putFromStream, putFromStream, putFromStream
 
Methods inherited from class org.apache.maven.wagon.AbstractWagon
addSessionListener, addTransferListener, cleanupGetTransfer, cleanupPutTransfer, connect, connect, connect, connect, connect, connect, createParentDirectories, disconnect, finishGetTransfer, finishPutTransfer, fireGetInitiated, fireGetStarted, firePutInitiated, firePutStarted, fireSessionConnectionRefused, fireSessionDisconnected, fireSessionDisconnecting, fireSessionError, fireSessionLoggedIn, fireSessionLoggedOff, fireSessionOpened, fireSessionOpening, fireTransferDebug, fireTransferError, fireTransferProgress, getAuthenticationInfo, getPath, getPermissionsOverride, getProxyInfo, getProxyInfo, getReadTimeout, getRepository, getSessionEventSupport, getTimeout, getTransfer, getTransfer, getTransfer, getTransfer, getTransferEventSupport, hasSessionListener, hasTransferListener, isInteractive, openConnection, postProcessListeners, putTransfer, putTransfer, removeSessionListener, removeTransferListener, setInteractive, setPermissionsOverride, setReadTimeout, setSessionEventSupport, setTimeout, setTransferEventSupport, transfer, transfer, transfer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.maven.wagon.Wagon
addSessionListener, addTransferListener, connect, connect, connect, connect, connect, connect, disconnect, getReadTimeout, getRepository, getTimeout, hasSessionListener, hasTransferListener, isInteractive, openConnection, removeSessionListener, removeTransferListener, setInteractive, setReadTimeout, setTimeout
 

Constructor Detail

FtpWagon

public FtpWagon()
Method Detail

isPassiveMode

public boolean isPassiveMode()

setPassiveMode

public void setPassiveMode(boolean passiveMode)

openConnectionInternal

protected void openConnectionInternal()
                               throws ConnectionException,
                                      AuthenticationException
Specified by:
openConnectionInternal in class AbstractWagon
Throws:
ConnectionException
AuthenticationException

firePutCompleted

protected void firePutCompleted(Resource resource,
                                File file)
Overrides:
firePutCompleted in class AbstractWagon

fireGetCompleted

protected void fireGetCompleted(Resource resource,
                                File localFile)
Overrides:
fireGetCompleted in class AbstractWagon

closeConnection

public void closeConnection()
                     throws ConnectionException
Specified by:
closeConnection in class StreamWagon
Throws:
ConnectionException

fillOutputData

public void fillOutputData(OutputData outputData)
                    throws TransferFailedException
Specified by:
fillOutputData in class StreamWagon
Throws:
TransferFailedException

fillInputData

public void fillInputData(InputData inputData)
                   throws TransferFailedException,
                          ResourceDoesNotExistException
Specified by:
fillInputData in class StreamWagon
Throws:
TransferFailedException
ResourceDoesNotExistException

fireSessionDebug

protected void fireSessionDebug(String msg)
Overrides:
fireSessionDebug in class AbstractWagon

getFileList

public List<String> getFileList(String destinationDirectory)
                         throws TransferFailedException,
                                ResourceDoesNotExistException,
                                AuthorizationException
Description copied from interface: Wagon

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.

Specified by:
getFileList in interface Wagon
Overrides:
getFileList in class AbstractWagon
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

resourceExists

public boolean resourceExists(String resourceName)
                       throws TransferFailedException,
                              AuthorizationException
Description copied from interface: Wagon
Check if a remote resource exists

Specified by:
resourceExists in interface Wagon
Overrides:
resourceExists in class AbstractWagon
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

supportsDirectoryCopy

public boolean supportsDirectoryCopy()
Description copied from interface: Wagon
Flag indicating if this wagon supports directory copy operations.

Specified by:
supportsDirectoryCopy in interface Wagon
Overrides:
supportsDirectoryCopy in class AbstractWagon
Returns:
whether if this wagon supports directory operations

putDirectory

public void putDirectory(File sourceDirectory,
                         String destinationDirectory)
                  throws TransferFailedException,
                         ResourceDoesNotExistException,
                         AuthorizationException
Description copied from interface: Wagon
Copy a directory from local system to remote

Specified by:
putDirectory in interface Wagon
Overrides:
putDirectory in class AbstractWagon
Parameters:
sourceDirectory - the local directory
destinationDirectory - the remote destination
Throws:
TransferFailedException
ResourceDoesNotExistException
AuthorizationException

getControlEncoding

public String getControlEncoding()

setControlEncoding

public void setControlEncoding(String controlEncoding)


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