|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ivy.plugins.repository.AbstractRepository
org.apache.ivy.plugins.repository.ssh.AbstractSshBasedRepository
org.apache.ivy.plugins.repository.sftp.SFTPRepository
public class SFTPRepository
SFTP Repository, allow to use a repository accessed by sftp protocol. It supports all operations: get, put and list. It relies on jsch for sftp handling, and thus is compatible with sftp version 0, 1, 2 and 3
Constructor Summary | |
---|---|
SFTPRepository()
|
Method Summary | |
---|---|
void |
get(java.lang.String source,
java.io.File destination)
Fetch a resource from the repository. |
protected java.lang.String |
getRepositoryScheme()
|
Resource |
getResource(java.lang.String source)
Return the resource associated with a specified identifier. |
java.util.List |
list(java.lang.String parent)
Return a listing of resources names |
java.io.InputStream |
openStream(SFTPResource resource)
|
void |
put(java.io.File source,
java.lang.String destination,
boolean overwrite)
|
Resource |
resolveResource(java.lang.String path)
This method is similar to getResource, except that the returned resource is fully initialised (resolved in the sftp repository), and that the given string is a full remote path |
Methods inherited from class org.apache.ivy.plugins.repository.ssh.AbstractSshBasedRepository |
---|
getHost, getKeyFile, getKeyFilePassword, getPassFile, getPort, getSession, getUser, getUserPassword, releaseSession, setHost, setKeyFile, setKeyFilePassword, setPassFile, setPort, setUser, setUserPassword |
Methods inherited from class org.apache.ivy.plugins.repository.AbstractRepository |
---|
addTransferListener, fireTransferCompleted, fireTransferCompleted, fireTransferError, fireTransferError, fireTransferEvent, fireTransferInitiated, fireTransferProgress, fireTransferStarted, fireTransferStarted, getFileSeparator, getName, hasTransferListener, put, removeTransferListener, setName, standardize, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SFTPRepository()
Method Detail |
---|
public Resource getResource(java.lang.String source)
Repository
source
- A string identifying the resource.
public Resource resolveResource(java.lang.String path)
path
- the full remote path in the repository of the resource
public java.io.InputStream openStream(SFTPResource resource) throws java.io.IOException
java.io.IOException
public void get(java.lang.String source, java.io.File destination) throws java.io.IOException
Repository
source
- A string identifying the resource to be fetched.destination
- Where to place the fetched resource.
java.io.IOException
- On retrieval failure.public void put(java.io.File source, java.lang.String destination, boolean overwrite) throws java.io.IOException
put
in class AbstractRepository
java.io.IOException
public java.util.List list(java.lang.String parent) throws java.io.IOException
Repository
parent
- The parent directory from which to generate the listing.
java.io.IOException
- On listing failure.protected java.lang.String getRepositoryScheme()
getRepositoryScheme
in class AbstractSshBasedRepository
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |