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

Class SftpWagon

Implemented Interfaces:
CommandExecutor, SshWagon, Wagon

public class SftpWagon
extends AbstractJschWagon

SFTP protocol wagon.
Version:
$Id: SftpWagon.java 477248 2006-11-20 16:42:51Z brett $
Author:
Brett Porter

Field Summary

Fields inherited from class org.apache.maven.wagon.providers.ssh.jsch.AbstractJschWagon

EXEC_CHANNEL, session

Fields inherited from class org.apache.maven.wagon.providers.ssh.AbstractSshWagon

DEFAULT_SSH_PORT, PATH_SEPARATOR, interactiveUserInfo, knownHostsProvider

Fields inherited from class org.apache.maven.wagon.AbstractWagon

DEFAULT_BUFFER_SIZE, authenticationInfo, interactive, proxyInfo, repository, sessionEventSupport, transferEventSupport

Fields inherited from interface org.apache.maven.wagon.CommandExecutor

ROLE

Fields inherited from interface org.apache.maven.wagon.Wagon

ROLE

Method Summary

void
get(String resourceName, File destination)
Downloads specified resource from the repository to given file.
boolean
getIfNewer(String resourceName, File destination, long timestamp)
Downloads specified resource from the repository if it was modfified since specified date.
boolean
getIfNewer(Resource resource, File destination, long timestamp)
void
put(File source, String destination)
Copy a file from local system to remote
void
put(String basedir, Resource resource, File source)

Methods inherited from class org.apache.maven.wagon.providers.ssh.jsch.AbstractJschWagon

closeConnection, executeCommand, openConnection

Methods inherited from class org.apache.maven.wagon.providers.ssh.AbstractSshWagon

executeCommand, getDirectoryMode, getFileList, getIfNewer, getInteractiveUserInfo, getKnownHostsProvider, getOctalMode, getOctalMode, getPort, getPrivateKey, getResource, getResourceDirectory, getResourceFilename, handleGetException, openConnection, putDirectory, resourceExists, setInteractiveUserInfo, setKnownHostsProvider, supportsDirectoryCopy

Methods inherited from class org.apache.maven.wagon.AbstractWagon

addSessionListener, addTransferListener, closeConnection, connect, connect, connect, connect, createParentDirectories, createZip, disconnect, fireGetCompleted, fireGetInitiated, fireGetStarted, firePutCompleted, firePutInitiated, firePutStarted, fireSessionConnectionRefused, fireSessionDebug, fireSessionDisconnected, fireSessionDisconnecting, fireSessionError, fireSessionLoggedIn, fireSessionLoggedOff, fireSessionOpened, fireSessionOpening, fireTransferDebug, fireTransferError, fireTransferProgress, getAuthenticationInfo, getFileList, getPath, getProxyInfo, getRepository, getSessionEventSupport, getTransfer, getTransfer, getTransferEventSupport, hasSessionListener, hasTransferListener, isInteractive, postProcessListeners, putDirectory, putTransfer, removeSessionListener, removeTransferListener, resourceExists, setInteractive, setSessionEventSupport, setTransferEventSupport, supportsDirectoryCopy, transfer, transfer, transfer

Method Details

get

public void get(String resourceName,
                File destination)
            throws TransferFailedException,
                   ResourceDoesNotExistException,
                   AuthorizationException
Downloads specified resource from the repository to given file.
Specified by:
get in interface Wagon
Parameters:
resourceName -
destination -

getIfNewer

public boolean getIfNewer(String resourceName,
                          File destination,
                          long timestamp)
            throws TransferFailedException,
                   ResourceDoesNotExistException,
                   AuthorizationException
Downloads specified resource from the repository if it was modfified since specified date. The date is measured in milliseconds, between the current time and midnight, January 1, 1970 UTC and aliged to GMT timezone.
Specified by:
getIfNewer in interface Wagon
Overrides:
getIfNewer in interface AbstractSshWagon
Parameters:
resourceName -
destination -
timestamp -
Returns:
true if newer resource has been downloaded, false if resource in the repository is older or has the same age.

getIfNewer

public boolean getIfNewer(Resource resource,
                          File destination,
                          long timestamp)
            throws ResourceDoesNotExistException,
                   TransferFailedException

put

public void put(File source,
                String destination)
            throws TransferFailedException,
                   ResourceDoesNotExistException,
                   AuthorizationException
Copy a file from local system to remote
Specified by:
put in interface Wagon
Parameters:
source - the local file
destination - the remote destination

put

public void put(String basedir,
                Resource resource,
                File source)
            throws TransferFailedException