org.apache.maven.wagon.providers.ssh.jsch
Class SftpWagon

java.lang.Object
  extended by org.apache.maven.wagon.AbstractWagon
      extended by org.apache.maven.wagon.StreamWagon
          extended by org.apache.maven.wagon.providers.ssh.jsch.AbstractJschWagon
              extended by org.apache.maven.wagon.providers.ssh.jsch.SftpWagon
All Implemented Interfaces:
CommandExecutor, SshWagon, StreamingWagon, Wagon

public class SftpWagon
extends AbstractJschWagon

SFTP protocol wagon.

Version:
$Id: SftpWagon.java 892636 2009-12-20 18:25:13Z bentmann $
Author:
Brett Porter

Field Summary
 
Fields inherited from class org.apache.maven.wagon.providers.ssh.jsch.AbstractJschWagon
EXEC_CHANNEL, session, sshTool
 
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.CommandExecutor
ROLE
 
Constructor Summary
SftpWagon()
           
 
Method Summary
protected  void cleanupGetTransfer(Resource resource)
           
protected  void cleanupPutTransfer(Resource resource)
           
 void closeConnection()
           
 void fillInputData(InputData inputData)
           
 void fillOutputData(OutputData outputData)
           
protected  void finishPutTransfer(Resource resource, InputStream input, OutputStream output)
           
 int getDirectoryMode(RepositoryPermissions permissions)
           
 List getFileList(String destinationDirectory)
           
 int getOctalMode(String mode)
           
 void openConnectionInternal()
           
 void putDirectory(File sourceDirectory, String destinationDirectory)
           
 boolean resourceExists(String resourceName)
           
 
Methods inherited from class org.apache.maven.wagon.providers.ssh.jsch.AbstractJschWagon
executeCommand, executeCommand, getInteractiveUserInfo, getKnownHostsProvider, handleGetException, setInteractiveUserInfo, setKnownHostsProvider, supportsDirectoryCopy
 
Methods inherited from class org.apache.maven.wagon.StreamWagon
checkInputStream, checkOutputStream, get, getIfNewer, getIfNewerToStream, getInputStream, getOutputStream, getToStream, put, putFromStream, putFromStream
 
Methods inherited from class org.apache.maven.wagon.AbstractWagon
addSessionListener, addTransferListener, connect, connect, connect, connect, connect, connect, createParentDirectories, disconnect, finishGetTransfer, fireGetCompleted, fireGetInitiated, fireGetStarted, firePutCompleted, firePutInitiated, firePutStarted, fireSessionConnectionRefused, fireSessionDebug, fireSessionDisconnected, fireSessionDisconnecting, fireSessionError, fireSessionLoggedIn, fireSessionLoggedOff, fireSessionOpened, fireSessionOpening, fireTransferDebug, fireTransferError, fireTransferProgress, getAuthenticationInfo, getPath, getPermissionsOverride, getProxyInfo, getProxyInfo, getRepository, getSessionEventSupport, getTimeout, getTransfer, getTransfer, getTransfer, getTransfer, getTransferEventSupport, hasSessionListener, hasTransferListener, isInteractive, openConnection, postProcessListeners, putTransfer, putTransfer, removeSessionListener, removeTransferListener, setInteractive, setPermissionsOverride, 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, get, getIfNewer, getRepository, getTimeout, hasSessionListener, hasTransferListener, isInteractive, openConnection, put, removeSessionListener, removeTransferListener, setInteractive, setTimeout
 

Constructor Detail

SftpWagon

public SftpWagon()
Method Detail

closeConnection

public void closeConnection()
Overrides:
closeConnection in class AbstractJschWagon

openConnectionInternal

public void openConnectionInternal()
                            throws AuthenticationException
Overrides:
openConnectionInternal in class AbstractJschWagon
Throws:
AuthenticationException

putDirectory

public void putDirectory(File sourceDirectory,
                         String destinationDirectory)
                  throws TransferFailedException,
                         ResourceDoesNotExistException,
                         AuthorizationException
Specified by:
putDirectory in interface Wagon
Overrides:
putDirectory in class AbstractJschWagon
Throws:
TransferFailedException
ResourceDoesNotExistException
AuthorizationException

getFileList

public List getFileList(String destinationDirectory)
                 throws TransferFailedException,
                        ResourceDoesNotExistException,
                        AuthorizationException
Specified by:
getFileList in interface Wagon
Overrides:
getFileList in class AbstractJschWagon
Throws:
TransferFailedException
ResourceDoesNotExistException
AuthorizationException

resourceExists

public boolean resourceExists(String resourceName)
                       throws TransferFailedException,
                              AuthorizationException
Specified by:
resourceExists in interface Wagon
Overrides:
resourceExists in class AbstractJschWagon
Throws:
TransferFailedException
AuthorizationException

cleanupGetTransfer

protected void cleanupGetTransfer(Resource resource)
Overrides:
cleanupGetTransfer in class AbstractWagon

cleanupPutTransfer

protected void cleanupPutTransfer(Resource resource)
Overrides:
cleanupPutTransfer in class AbstractWagon

finishPutTransfer

protected void finishPutTransfer(Resource resource,
                                 InputStream input,
                                 OutputStream output)
                          throws TransferFailedException
Overrides:
finishPutTransfer in class AbstractWagon
Throws:
TransferFailedException

fillInputData

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

fillOutputData

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

getDirectoryMode

public int getDirectoryMode(RepositoryPermissions permissions)
Parameters:
permissions - repository's permissions
Returns:
the directory mode for the repository or -1 if it wasn't set

getOctalMode

public int getOctalMode(String mode)


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