org.pentaho.di.job.entries.sftp
Class SFTPClient

java.lang.Object
  extended by org.pentaho.di.job.entries.sftp.SFTPClient

public class SFTPClient
extends Object


Field Summary
static String HTTP_DEFAULT_PORT
           
static String PROXY_TYPE_HTTP
           
static String PROXY_TYPE_SOCKS5
           
static String SOCKS5_DEFAULT_PORT
           
static int SSH_DEFAULT_PORT
           
 
Constructor Summary
SFTPClient(InetAddress serverIP, int serverPort, String userName)
          Init Helper Class with connection settings
SFTPClient(InetAddress serverIP, int serverPort, String userName, String privateKeyFilename)
          Init Helper Class with connection settings
SFTPClient(InetAddress serverIP, int serverPort, String userName, String privateKeyFilename, String passPhrase)
          Init Helper Class with connection settings
 
Method Summary
 void chdir(String dirToChangeTo)
           
 void createFolder(String foldername)
          Creates this file as a folder.
 void delete(String file)
           
 String[] dir()
           
 void disconnect()
           
 boolean folderExists(String foldername)
           
 void get(String localFilePath, String remoteFile)
           
 String getCompression()
           
 org.apache.commons.vfs.FileType getFileType(String filename)
           
 String getPassword()
           
 String GetPrivateKeyFileName()
           
 String GetPrivateKeyPassPhrase()
           
 InetAddress getServerIP()
           
 int getServerPort()
           
 String getUserName()
           
 void login(String password)
           
 void put(org.apache.commons.vfs.FileObject fileObject, String remoteFile)
           
 String pwd()
           
 void renameFile(String sourcefilename, String destinationfilename)
          Rename the file.
 void setCompression(String compression)
           
 void setProxy(String host, String port, String user, String pass, String proxyType)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROXY_TYPE_SOCKS5

public static final String PROXY_TYPE_SOCKS5
See Also:
Constant Field Values

PROXY_TYPE_HTTP

public static final String PROXY_TYPE_HTTP
See Also:
Constant Field Values

HTTP_DEFAULT_PORT

public static final String HTTP_DEFAULT_PORT
See Also:
Constant Field Values

SOCKS5_DEFAULT_PORT

public static final String SOCKS5_DEFAULT_PORT
See Also:
Constant Field Values

SSH_DEFAULT_PORT

public static final int SSH_DEFAULT_PORT
See Also:
Constant Field Values
Constructor Detail

SFTPClient

public SFTPClient(InetAddress serverIP,
                  int serverPort,
                  String userName)
           throws KettleJobException
Init Helper Class with connection settings

Parameters:
serverIP - IP address of remote server
serverPort - port of remote server
userName - username of remote server
Throws:
KettleJobException

SFTPClient

public SFTPClient(InetAddress serverIP,
                  int serverPort,
                  String userName,
                  String privateKeyFilename)
           throws KettleJobException
Init Helper Class with connection settings

Parameters:
serverIP - IP address of remote server
serverPort - port of remote server
userName - username of remote server
privateKeyFilename - filename of private key
Throws:
KettleJobException

SFTPClient

public SFTPClient(InetAddress serverIP,
                  int serverPort,
                  String userName,
                  String privateKeyFilename,
                  String passPhrase)
           throws KettleJobException
Init Helper Class with connection settings

Parameters:
serverIP - IP address of remote server
serverPort - port of remote server
userName - username of remote server
privateKeyFilename - filename of private key
passPhrase - passphrase
Throws:
KettleJobException
Method Detail

login

public void login(String password)
           throws KettleJobException
Throws:
KettleJobException

chdir

public void chdir(String dirToChangeTo)
           throws KettleJobException
Throws:
KettleJobException

dir

public String[] dir()
             throws KettleJobException
Throws:
KettleJobException

get

public void get(String localFilePath,
                String remoteFile)
         throws KettleJobException
Throws:
KettleJobException

pwd

public String pwd()
           throws KettleJobException
Throws:
KettleJobException

put

public void put(org.apache.commons.vfs.FileObject fileObject,
                String remoteFile)
         throws KettleJobException
Throws:
KettleJobException

delete

public void delete(String file)
            throws KettleJobException
Throws:
KettleJobException

createFolder

public void createFolder(String foldername)
                  throws KettleJobException
Creates this file as a folder.

Throws:
KettleJobException

renameFile

public void renameFile(String sourcefilename,
                       String destinationfilename)
                throws KettleJobException
Rename the file.

Throws:
KettleJobException

getFileType

public org.apache.commons.vfs.FileType getFileType(String filename)
                                            throws KettleJobException
Throws:
KettleJobException

folderExists

public boolean folderExists(String foldername)

setProxy

public void setProxy(String host,
                     String port,
                     String user,
                     String pass,
                     String proxyType)
              throws KettleJobException
Throws:
KettleJobException

disconnect

public void disconnect()

GetPrivateKeyFileName

public String GetPrivateKeyFileName()

GetPrivateKeyPassPhrase

public String GetPrivateKeyPassPhrase()

getPassword

public String getPassword()

getServerPort

public int getServerPort()

getUserName

public String getUserName()

getServerIP

public InetAddress getServerIP()

setCompression

public void setCompression(String compression)

getCompression

public String getCompression()