|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.maven.wagon.AbstractWagon
org.apache.maven.wagon.StreamWagon
org.apache.maven.wagon.providers.ssh.jsch.AbstractJschWagon
org.apache.maven.wagon.providers.ssh.jsch.SftpWagon
public class SftpWagon
SFTP protocol wagon.
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,
java.io.InputStream input,
java.io.OutputStream output)
|
int |
getDirectoryMode(RepositoryPermissions permissions)
|
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. |
int |
getOctalMode(java.lang.String mode)
|
void |
openConnectionInternal()
|
void |
putDirectory(java.io.File sourceDirectory,
java.lang.String destinationDirectory)
Copy a directory from local system to remote |
boolean |
resourceExists(java.lang.String resourceName)
Check if a remote resource exists |
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 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 |
---|
public SftpWagon()
Method Detail |
---|
public void closeConnection()
closeConnection
in class AbstractJschWagon
public void openConnectionInternal() throws AuthenticationException
openConnectionInternal
in class AbstractJschWagon
AuthenticationException
public void putDirectory(java.io.File sourceDirectory, java.lang.String destinationDirectory) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
Wagon
putDirectory
in interface Wagon
putDirectory
in class AbstractJschWagon
sourceDirectory
- the local directorydestinationDirectory
- the remote destination
TransferFailedException
ResourceDoesNotExistException
AuthorizationException
public java.util.List getFileList(java.lang.String destinationDirectory) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
Wagon
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.
getFileList
in interface Wagon
getFileList
in class AbstractJschWagon
destinationDirectory
- directory to list contents of
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.
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 directorypublic boolean resourceExists(java.lang.String resourceName) throws TransferFailedException, AuthorizationException
Wagon
resourceExists
in interface Wagon
resourceExists
in class AbstractJschWagon
TransferFailedException
- if there's an error trying to access the remote side
AuthorizationException
- if not authorized to verify the existence of the resourceprotected void cleanupGetTransfer(Resource resource)
cleanupGetTransfer
in class AbstractWagon
protected void cleanupPutTransfer(Resource resource)
cleanupPutTransfer
in class AbstractWagon
protected void finishPutTransfer(Resource resource, java.io.InputStream input, java.io.OutputStream output) throws TransferFailedException
finishPutTransfer
in class AbstractWagon
TransferFailedException
public void fillInputData(InputData inputData) throws TransferFailedException, ResourceDoesNotExistException
fillInputData
in class StreamWagon
TransferFailedException
ResourceDoesNotExistException
public void fillOutputData(OutputData outputData) throws TransferFailedException
fillOutputData
in class StreamWagon
TransferFailedException
public int getDirectoryMode(RepositoryPermissions permissions)
permissions
- repository's permissions
-1
if it
wasn't setpublic int getOctalMode(java.lang.String mode)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |