com.taleo.integration.client.customstep.ftp
Class BaseFtpStep

java.lang.Object
  extended by com.taleo.integration.client.step.BaseStep
      extended by com.taleo.integration.client.step.BaseCustomStep
          extended by com.taleo.integration.client.customstep.BaseCustomStep
              extended by com.taleo.integration.client.customstep.ftp.BaseFtpStep
All Implemented Interfaces:
com.taleo.integration.client.step.CustomStep, com.taleo.integration.client.step.Step
Direct Known Subclasses:
DeleteFtpStep, DownloadFtpPreStep, UploadFtpStep

public abstract class BaseFtpStep
extends BaseCustomStep

Abstract class for FTP steps.

This step takes all parameters from its base class BaseCustomStep and the following additional parameters:

This class is dependent on:

Author:
Romain Guay, Oracle Corporation

Field Summary
protected  java.lang.String host
          The FTP host.
protected  int nbRetries
          The number of retries.
protected  java.lang.String password
          The FTP password (AES128 encrypted or clear).
protected  int port
          The FTP port.
 java.lang.String PROXY_TYPE_FTP
           
 java.lang.String PROXY_TYPE_HTTP
           
 java.lang.String PROXY_TYPE_NONE
          The proxy types.
protected  java.lang.String proxyHost
          The proxy host.
protected  java.lang.String proxyPassword
          The proxy password (AES128 encrypted or clear).
protected  int proxyPort
          The proxy port.
protected  java.lang.String proxyType
          The proxy type.
protected  java.lang.String proxyUsername
          The proxy username.
protected  java.lang.String remoteDirectory
          The FTP remote directory.
protected  int retryFactor
          The retry factor.
protected  int retryInterval
          The interval between retries, in seconds.
 java.lang.String TRANSFER_MODE_ACTIVE
          The transfer modes.
 java.lang.String TRANSFER_MODE_PASSIVE
           
 int TRANSFER_TYPE_ASCII
           
 int TRANSFER_TYPE_BINARY
          The transfer types.
protected  java.lang.String transferMode
          The transfer mode.
protected  int transferType
          The transfer type.
protected  java.lang.String username
          The FTP username.
 
Fields inherited from class com.taleo.integration.client.customstep.BaseCustomStep
parameterNames
 
Fields inherited from class com.taleo.integration.client.step.BaseCustomStep
parameters
 
Fields inherited from class com.taleo.integration.client.step.BaseStep
commType, ERROR_NULL_GLOBAL_CONFIG, ERROR_NULL_PIPELINE, ERROR_NULL_STEP_CONFIG, productCode, tempFolder, type, version
 
Constructor Summary
BaseFtpStep()
          Constructor without arguments.
 
Method Summary
protected  org.apache.commons.net.ftp.FTPClient getFtpClient()
          Get the FTP Client.
 java.lang.String getHost()
          Get the FTP host.
 int getNbRetries()
          Get the number of retries.
 java.lang.String getPassword()
          Get the FTP password.
 int getPort()
          Get the FTP port.
 java.lang.String getProxyHost()
          Get the proxy host.
 java.lang.String getProxyPassword()
          Get the proxy password.
 int getProxyPort()
          Get the proxy port.
 java.lang.String getProxyType()
          Get the proxy type.
 java.lang.String getProxyUsername()
          Get the proxy username.
 java.lang.String getRemoteDirectory()
          Get the FTP remote directory.
 int getRetryFactor()
          Get the retry factor.
 int getRetryInterval()
          Get the retry interval, in seconds.
 java.lang.String getTransferMode()
          Get the transfer mode.
 int getTransferType()
          Get the transfer type.
 java.lang.String getUsername()
          Get the FTP username.
 void init(com.taleo.ws.integration.client.GlobalConfig config)
           
protected  void logout()
          Log out the FTP Client.
 void setHost(java.lang.String host)
          Set the FTP host.
 void setNbRetries(int nbRetries)
          Set the number of retries.
 void setPassword(java.lang.String password)
          Set the FTP password.
 void setPort(int port)
          Set the FTP port.
 void setProxyHost(java.lang.String proxyHost)
          Set the proxy host.
 void setProxyPassword(java.lang.String proxyPassword)
          Set the proxy password.
 void setProxyPort(int proxyPort)
          Set the proxy port.
 void setProxyType(java.lang.String proxyType)
          Set the proxy type.
 void setProxyUsername(java.lang.String proxyUsername)
          Set the proxy username.
 void setRemoteDirectory(java.lang.String remoteDirectory)
          Set the FTP remote directory.
 void setRetryFactor(int retryFactor)
          Set the retry factor.
 void setRetryInterval(int retryInterval)
          Set the retry interval, in seconds.
 void setTransferMode(java.lang.String transferMode)
          Set the transfer mode (TRANSFER_MODE_ACTIVE or TRANSFER_MODE_PASSIVE).
 void setTransferType(int transferType)
          Set the transfer type (TRANSFER_TYPE_BINARY or TRANSFER_TYPE_ASCII).
 void setUsername(java.lang.String username)
          Set the FTP username.
 
Methods inherited from class com.taleo.integration.client.customstep.BaseCustomStep
createTempFile, createTempFile, getEncoding, getTempFolder, isActive, registerParameterName, setActive, setEncoding, validateParameterNames
 
Methods inherited from class com.taleo.integration.client.step.BaseCustomStep
getDescription, getIdentifier, getName, getSupportedPipeline, getType, init
 
Methods inherited from class com.taleo.integration.client.step.BaseStep
getAllProcessSupportPipeline, getCurrentFile, getCurrentFile, getCurrentMessage, getPostProcessSupportPipeline, getPreProcessSupportPipeline, isOriginalFile, validateLastStepType, validateMessageType, validatePipeline
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.taleo.integration.client.step.Step
execute, validatePipeline
 

Field Detail

TRANSFER_TYPE_BINARY

public final int TRANSFER_TYPE_BINARY
The transfer types.

See Also:
Constant Field Values

TRANSFER_TYPE_ASCII

public final int TRANSFER_TYPE_ASCII
See Also:
Constant Field Values

TRANSFER_MODE_ACTIVE

public final java.lang.String TRANSFER_MODE_ACTIVE
The transfer modes.

See Also:
Constant Field Values

TRANSFER_MODE_PASSIVE

public final java.lang.String TRANSFER_MODE_PASSIVE
See Also:
Constant Field Values

PROXY_TYPE_NONE

public final java.lang.String PROXY_TYPE_NONE
The proxy types.

See Also:
Constant Field Values

PROXY_TYPE_FTP

public final java.lang.String PROXY_TYPE_FTP
See Also:
Constant Field Values

PROXY_TYPE_HTTP

public final java.lang.String PROXY_TYPE_HTTP
See Also:
Constant Field Values

host

protected java.lang.String host
The FTP host.


port

protected int port
The FTP port.


username

protected java.lang.String username
The FTP username.


password

protected java.lang.String password
The FTP password (AES128 encrypted or clear).


remoteDirectory

protected java.lang.String remoteDirectory
The FTP remote directory.


nbRetries

protected int nbRetries
The number of retries.


retryInterval

protected int retryInterval
The interval between retries, in seconds.


retryFactor

protected int retryFactor
The retry factor.


transferType

protected int transferType
The transfer type.


transferMode

protected java.lang.String transferMode
The transfer mode.


proxyType

protected java.lang.String proxyType
The proxy type.


proxyHost

protected java.lang.String proxyHost
The proxy host.


proxyPort

protected int proxyPort
The proxy port.


proxyUsername

protected java.lang.String proxyUsername
The proxy username.


proxyPassword

protected java.lang.String proxyPassword
The proxy password (AES128 encrypted or clear).

Constructor Detail

BaseFtpStep

public BaseFtpStep()
Constructor without arguments.

Method Detail

getHost

public java.lang.String getHost()
Get the FTP host.

Returns:

setHost

public void setHost(java.lang.String host)
Set the FTP host.

Parameters:
host -

getPassword

public java.lang.String getPassword()
Get the FTP password.

Returns:

setPassword

public void setPassword(java.lang.String password)
Set the FTP password.

Parameters:
password -

getPort

public int getPort()
Get the FTP port.

Returns:

setPort

public void setPort(int port)
Set the FTP port.

Parameters:
port -

getRemoteDirectory

public java.lang.String getRemoteDirectory()
Get the FTP remote directory.

Returns:

setRemoteDirectory

public void setRemoteDirectory(java.lang.String remoteDirectory)
Set the FTP remote directory.

Parameters:
remoteDirectory -

getUsername

public java.lang.String getUsername()
Get the FTP username.

Returns:

setUsername

public void setUsername(java.lang.String username)
Set the FTP username.

Parameters:
username -

getNbRetries

public int getNbRetries()
Get the number of retries.

Returns:

setNbRetries

public void setNbRetries(int nbRetries)
Set the number of retries.

Parameters:
nbRetries -

getRetryInterval

public int getRetryInterval()
Get the retry interval, in seconds.

Returns:

setRetryInterval

public void setRetryInterval(int retryInterval)
Set the retry interval, in seconds.

Parameters:
retryInterval -

getRetryFactor

public int getRetryFactor()
Get the retry factor.

Returns:

setRetryFactor

public void setRetryFactor(int retryFactor)
Set the retry factor.

Parameters:
retryFactor -

getTransferType

public int getTransferType()
Get the transfer type.

Returns:

setTransferType

public void setTransferType(int transferType)
Set the transfer type (TRANSFER_TYPE_BINARY or TRANSFER_TYPE_ASCII).

Parameters:
transferType -

getTransferMode

public java.lang.String getTransferMode()
Get the transfer mode.

Returns:

setTransferMode

public void setTransferMode(java.lang.String transferMode)
Set the transfer mode (TRANSFER_MODE_ACTIVE or TRANSFER_MODE_PASSIVE).

Parameters:
transferMode -

getProxyType

public java.lang.String getProxyType()
Get the proxy type.

Returns:

setProxyType

public void setProxyType(java.lang.String proxyType)
Set the proxy type.

Parameters:
proxyType -

getProxyHost

public java.lang.String getProxyHost()
Get the proxy host.

Returns:

setProxyHost

public void setProxyHost(java.lang.String proxyHost)
Set the proxy host.

Parameters:
proxyHost -

getProxyPort

public int getProxyPort()
Get the proxy port.

Returns:

setProxyPort

public void setProxyPort(int proxyPort)
Set the proxy port.

Parameters:
proxyPort -

getProxyUsername

public java.lang.String getProxyUsername()
Get the proxy username.

Returns:

setProxyUsername

public void setProxyUsername(java.lang.String proxyUsername)
Set the proxy username.

Parameters:
proxyUsername -

getProxyPassword

public java.lang.String getProxyPassword()
Get the proxy password.

Returns:

setProxyPassword

public void setProxyPassword(java.lang.String proxyPassword)
Set the proxy password.

Parameters:
proxyPassword -

init

public void init(com.taleo.ws.integration.client.GlobalConfig config)
Overrides:
init in class BaseCustomStep

getFtpClient

protected org.apache.commons.net.ftp.FTPClient getFtpClient()
                                                     throws java.io.IOException
Get the FTP Client.

Returns:
The open FTP client.
Throws:
java.io.IOException
FTPException
FTPIllegalReplyException

logout

protected void logout()
Log out the FTP Client.