com.mindtree.techworks.insight.download
Class SFTPFileset

java.lang.Object
  extended by com.mindtree.techworks.insight.download.Fileset
      extended by com.mindtree.techworks.insight.download.SFTPFileset

public class SFTPFileset
extends Fileset

This is a specialization of the Fileset class to contain information such as the host, port, etc., about a SFTPFileset.

Version:
$Revision: 27 $ $Date: 2007-12-16 04:58:03 -0700 (Sun, 16 Dec 2007) $
Author:
Regunath B
See Also:
Fileset

Field Summary
static int SFTP_DEFAULT_PORT
          The default SFTP Port (22)
static java.lang.String SFTP_PROTOCOL
          The name of the SFTP Protocol
 
Fields inherited from class com.mindtree.techworks.insight.download.Fileset
FTP_FILESET, HTTP_FILESET, LOCAL_FILESET, SFTP_FILESET
 
Constructor Summary
SFTPFileset(java.lang.String filesetName)
          Constructs a new FTPFileset object with just the name of the fileset.
SFTPFileset(java.lang.String filesetName, java.lang.String host, int port, java.lang.String defaultDirectory, boolean isAuthenticationRequired, java.lang.String userName, java.lang.String password, boolean isProxyRequired)
          Constructs a new SFTPFileSet object with the parameters supplied.
 
Method Summary
 java.lang.String getDefaultDirectory()
           
 java.lang.String getHost()
           
 java.net.URL getHostURL()
          Returns the URL form of the host information
 java.lang.String getPassword()
           
 java.net.PasswordAuthentication getPasswordAuthentication()
          Returns the authentication information encapsulated in a PasswordAuthentication object.
 int getPort()
           
 java.lang.String getUserName()
           
 boolean isAuthenticationRequired()
           
 boolean isProxyRequired()
           
 void setAuthenticationRequired(boolean isAuthenticationRequired)
           
 void setDefaultDirectory(java.lang.String defaultDirectory)
           
 void setHost(java.lang.String host)
           
 void setPassword(java.lang.String password)
           
 void setPort(int port)
           
 void setProxyRequired(boolean isProxyRequired)
           
 void setUserName(java.lang.String userName)
           
 
Methods inherited from class com.mindtree.techworks.insight.download.Fileset
addFile, getFile, getFileCount, getFileList, getFilesetName, getType, getTypeString, iterateFiles, setFileList, setTypeString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SFTP_PROTOCOL

public static final java.lang.String SFTP_PROTOCOL
The name of the SFTP Protocol

See Also:
Constant Field Values

SFTP_DEFAULT_PORT

public static final int SFTP_DEFAULT_PORT
The default SFTP Port (22)

See Also:
Constant Field Values
Constructor Detail

SFTPFileset

public SFTPFileset(java.lang.String filesetName)
Constructs a new FTPFileset object with just the name of the fileset.

Parameters:
filesetName - The name of the fileset.

SFTPFileset

public SFTPFileset(java.lang.String filesetName,
                   java.lang.String host,
                   int port,
                   java.lang.String defaultDirectory,
                   boolean isAuthenticationRequired,
                   java.lang.String userName,
                   java.lang.String password,
                   boolean isProxyRequired)
Constructs a new SFTPFileSet object with the parameters supplied.

Parameters:
filesetName - The name of the fileset.
host - The host to connect to
port - The port to connect to. (Default: 22)
defaultDirectory - The default directory on the remote machine.
isAuthenticationRequired - If authentication is required.
userName - The username to use
password - The password for the username
isProxyRequired - If proxy is required
Method Detail

getDefaultDirectory

public java.lang.String getDefaultDirectory()
Returns:
Returns the defaultDirectory.

setDefaultDirectory

public void setDefaultDirectory(java.lang.String defaultDirectory)
Parameters:
defaultDirectory - The defaultDirectory to set.

getHost

public java.lang.String getHost()
Returns:
Returns the host.

setHost

public void setHost(java.lang.String host)
Parameters:
host - The host to set.

isAuthenticationRequired

public boolean isAuthenticationRequired()
Returns:
Returns the isAuthenticationRequired.

setAuthenticationRequired

public void setAuthenticationRequired(boolean isAuthenticationRequired)
Parameters:
isAuthenticationRequired - The isAuthenticationRequired to set.

isProxyRequired

public boolean isProxyRequired()
Returns:
Returns the isProxyRequired.

setProxyRequired

public void setProxyRequired(boolean isProxyRequired)
Parameters:
isProxyRequired - The isProxyRequired to set.

getPassword

public java.lang.String getPassword()
Returns:
Returns the password.

setPassword

public void setPassword(java.lang.String password)
Parameters:
password - The password to set.

getPort

public int getPort()
Returns:
Returns the port.

setPort

public void setPort(int port)
Parameters:
port - The port to set.

getUserName

public java.lang.String getUserName()
Returns:
Returns the userName.

setUserName

public void setUserName(java.lang.String userName)
Parameters:
userName - The userName to set.

getHostURL

public java.net.URL getHostURL()
                        throws java.net.MalformedURLException
Returns the URL form of the host information

Returns:
An url for the host information
Throws:
java.net.MalformedURLException - If the URL cannot be formed.

getPasswordAuthentication

public java.net.PasswordAuthentication getPasswordAuthentication()
Returns the authentication information encapsulated in a PasswordAuthentication object. It returns null, if authentication is not required or either userName or password are null.

Returns:
A PasswordAuthentication object for the userName and password supplied.


Copyright © 2003-2008 MindTree Consulting Ltd.. All Rights Reserved.