com.zanox.hudson.plugins
Class FTPSite

java.lang.Object
  extended by com.zanox.hudson.plugins.FTPSite

public class FTPSite
extends java.lang.Object

This class

HeadURL: $HeadURL: http://z-bld-02:8080/zxdev/zxant_test_environment/trunk/formatting/codeTemplates.xml $
Date: $Date: 2008-04-22 11:53:34 +0200 (Di, 22 Apr 2008) $
Revision: $Revision: 2451 $

Author:
$Author: ZANOX-COM\fit $

Constructor Summary
FTPSite()
          Instantiates a new FTP site.
FTPSite(java.lang.String profileName, java.lang.String hostname, int port, int timeOut, java.lang.String username, java.lang.String password, java.lang.String ftpDir)
          Instantiates a new FTP site.
FTPSite(java.lang.String hostname, java.lang.String port, java.lang.String timeOut, java.lang.String username, java.lang.String password)
          Instantiates a new FTP site.
 
Method Summary
 void changedToProjectRootDir(java.lang.String projectRootDir, java.io.PrintStream logger)
          Changed to project root dir.
 void closeSession()
          This method disconnect the current ftp connection.
 void createSession()
          This method open an ftp connection and login with the specified user name and password.
 java.lang.String getDisplayName()
          Gets the display name.
 java.lang.String getFtpDir()
          Gets the ftp dir.
 java.lang.String getHostname()
          Gets the hostname.
 int getIntegerPort()
          Gets the integer port.
 java.lang.String getName()
          Gets the name.
 java.lang.String getPassword()
          Gets the password.
 java.lang.String getPort()
          Gets the port.
 java.lang.String getProfileName()
          Gets the profile name.
 int getTimeOut()
          Gets the time out.
 java.lang.String getUsername()
          Gets the username.
 void mkdirs(java.lang.String filePath, java.io.PrintStream logger)
          Mkdirs.
 void setFtpDir(java.lang.String rootRepositoryPath)
          Sets the ftp dir.
 void setHostname(java.lang.String hostname)
          Sets the hostname.
 void setPassword(java.lang.String password)
          Sets the password.
 void setPort(java.lang.String port)
          Sets the port.
 void setProfileName(java.lang.String profileName)
          Sets the profile name.
 void setTimeOut(int timeOut)
          Sets the time out.
 void setUsername(java.lang.String username)
          Sets the username.
 void upload(hudson.FilePath filePath, java.util.Map<java.lang.String,java.lang.String> envVars, java.io.PrintStream logger)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FTPSite

public FTPSite()
Instantiates a new FTP site.


FTPSite

public FTPSite(java.lang.String profileName,
               java.lang.String hostname,
               int port,
               int timeOut,
               java.lang.String username,
               java.lang.String password,
               java.lang.String ftpDir)
Instantiates a new FTP site.

Parameters:
profileName - the profile name
hostname - the hostname
port - the port
timeOut - the time out
username - the username
password - the password
ftpDir - the ftp dir

FTPSite

public FTPSite(java.lang.String hostname,
               java.lang.String port,
               java.lang.String timeOut,
               java.lang.String username,
               java.lang.String password)
Instantiates a new FTP site.

Parameters:
hostname - the hostname
port - the port
timeOut - the time out
username - the username
password - the password
Method Detail

getTimeOut

public int getTimeOut()
Gets the time out.

Returns:
the time out

setTimeOut

public void setTimeOut(int timeOut)
Sets the time out.

Parameters:
timeOut - the new time out

getDisplayName

public java.lang.String getDisplayName()
Gets the display name.

Returns:
the display name

getProfileName

public java.lang.String getProfileName()
Gets the profile name.

Returns:
the profile name

setProfileName

public void setProfileName(java.lang.String profileName)
Sets the profile name.

Parameters:
profileName - the new profile name

getHostname

public java.lang.String getHostname()
Gets the hostname.

Returns:
the hostname

setHostname

public void setHostname(java.lang.String hostname)
Sets the hostname.

Parameters:
hostname - the new hostname

getPort

public java.lang.String getPort()
Gets the port.

Returns:
the port

setPort

public void setPort(java.lang.String port)
Sets the port.

Parameters:
port - the new port

getIntegerPort

public int getIntegerPort()
Gets the integer port.

Returns:
the integer port

getUsername

public java.lang.String getUsername()
Gets the username.

Returns:
the username

setUsername

public void setUsername(java.lang.String username)
Sets the username.

Parameters:
username - the new username

getPassword

public java.lang.String getPassword()
Gets the password.

Returns:
the password

setPassword

public void setPassword(java.lang.String password)
Sets the password.

Parameters:
password - the new password

getFtpDir

public java.lang.String getFtpDir()
Gets the ftp dir.

Returns:
the ftp dir

setFtpDir

public void setFtpDir(java.lang.String rootRepositoryPath)
Sets the ftp dir.

Parameters:
rootRepositoryPath - the new ftp dir

getName

public java.lang.String getName()
Gets the name.

Returns:
the name

createSession

public void createSession()
                   throws java.io.IOException
This method open an ftp connection and login with the specified user name and password.

Throws:
java.io.IOException - Signals that an I/O exception has occurred.

closeSession

public void closeSession()
This method disconnect the current ftp connection.


changedToProjectRootDir

public void changedToProjectRootDir(java.lang.String projectRootDir,
                                    java.io.PrintStream logger)
                             throws java.io.IOException
Changed to project root dir.

Parameters:
projectRootDir - the project root dir
logger - the logger
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

upload

public void upload(hudson.FilePath filePath,
                   java.util.Map<java.lang.String,java.lang.String> envVars,
                   java.io.PrintStream logger)
            throws java.io.IOException,
                   java.lang.InterruptedException,
                   com.jcraft.jsch.SftpException
Throws:
java.io.IOException
java.lang.InterruptedException
com.jcraft.jsch.SftpException

mkdirs

public void mkdirs(java.lang.String filePath,
                   java.io.PrintStream logger)
            throws com.jcraft.jsch.SftpException,
                   java.io.IOException
Mkdirs.

Parameters:
filePath - the file path
logger - the logger
Throws:
com.jcraft.jsch.SftpException - the sftp exception
java.io.IOException - Signals that an I/O exception has occurred.


Copyright © 2011. All Rights Reserved.