public class SftpWagon extends AbstractJschWagon
|
EXEC_CHANNEL, session, sshToolauthenticationInfo, DEFAULT_BUFFER_SIZE, interactive, proxyInfo, repository, sessionEventSupport, transferEventSupportROLEDEFAULT_CONNECTION_TIMEOUT, DEFAULT_READ_TIMEOUT| Constructor and Description |
|---|
SftpWagon() |
| Modifier and Type | Method and Description |
|---|---|
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<String> |
getFileList(String destinationDirectory)
Returns a
List of strings naming the files and directories in the directory denoted by
this abstract pathname. |
int |
getOctalMode(String mode) |
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
|
executeCommand, executeCommand, getInteractiveUserInfo, getKnownHostsProvider, handleGetException, setInteractiveUserInfo, setKnownHostsProvider, supportsDirectoryCopycheckInputStream, checkOutputStream, get, getIfNewer, getIfNewerToStream, getInputStream, getOutputStream, getToStream, put, putFromStream, putFromStream, putFromStreamaddSessionListener, 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, getReadTimeout, getRepository, getSessionEventSupport, getTimeout, getTransfer, getTransfer, getTransfer, getTransfer, getTransfer, getTransfer, getTransferEventSupport, hasSessionListener, hasTransferListener, isInteractive, openConnection, postProcessListeners, putTransfer, putTransfer, removeSessionListener, removeTransferListener, setInteractive, setPermissionsOverride, setReadTimeout, setSessionEventSupport, setTimeout, setTransferEventSupport, transfer, transfer, transfer, transferclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddSessionListener, addTransferListener, connect, connect, connect, connect, connect, connect, disconnect, get, getIfNewer, getReadTimeout, getRepository, getTimeout, hasSessionListener, hasTransferListener, isInteractive, openConnection, put, removeSessionListener, removeTransferListener, setInteractive, setReadTimeout, setTimeoutpublic SftpWagon()
public void closeConnection()
closeConnection in class AbstractJschWagonpublic void openConnectionInternal() throws AuthenticationException
openConnectionInternal in class AbstractJschWagonAuthenticationExceptionpublic void putDirectory(File sourceDirectory, String destinationDirectory) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
WagonputDirectory in interface WagonputDirectory in class AbstractJschWagonsourceDirectory - the local directorydestinationDirectory - the remote destinationTransferFailedExceptionResourceDoesNotExistExceptionAuthorizationExceptionpublic List<String> getFileList(String destinationDirectory) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
WagonList 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.
getFileList in interface WagongetFileList in class AbstractJschWagondestinationDirectory - directory to list contents ofList 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.TransferFailedException - if there's an error trying to access the remote sideResourceDoesNotExistException - if destinationDirectory does not exist or is not a directoryAuthorizationException - if not authorized to list the contents of the directorypublic boolean resourceExists(String resourceName) throws TransferFailedException, AuthorizationException
WagonresourceExists in interface WagonresourceExists in class AbstractJschWagonTransferFailedException - if there's an error trying to access the remote sideAuthorizationException - if not authorized to verify the existence of the resourceprotected void cleanupGetTransfer(Resource resource)
cleanupGetTransfer in class AbstractWagonprotected void cleanupPutTransfer(Resource resource)
cleanupPutTransfer in class AbstractWagonprotected void finishPutTransfer(Resource resource, InputStream input, OutputStream output) throws TransferFailedException
finishPutTransfer in class AbstractWagonTransferFailedExceptionpublic void fillInputData(InputData inputData) throws TransferFailedException, ResourceDoesNotExistException
fillInputData in class StreamWagonTransferFailedExceptionResourceDoesNotExistExceptionpublic void fillOutputData(OutputData outputData) throws TransferFailedException
fillOutputData in class StreamWagonTransferFailedExceptionpublic int getDirectoryMode(RepositoryPermissions permissions)
permissions - repository's permissions-1 if it
wasn't setpublic int getOctalMode(String mode)
Copyright © 2003–2013 The Apache Software Foundation. All rights reserved.