com.taleo.integration.client.customstep.csv
Class DocumentFromURLPreStep
java.lang.Object
com.taleo.integration.client.step.BaseStep
com.taleo.integration.client.step.BaseCustomStep
com.taleo.integration.client.customstep.BaseCustomStep
com.taleo.integration.client.customstep.csv.BaseCustomCsvStep
com.taleo.integration.client.customstep.csv.BaseCustomCsvPostStep
com.taleo.integration.client.customstep.csv.BaseTransformPostStep
com.taleo.integration.client.customstep.csv.DocumentFromURLPreStep
- All Implemented Interfaces:
- com.taleo.integration.client.step.CustomStep, com.taleo.integration.client.step.Step
public class DocumentFromURLPreStep
- extends BaseTransformPostStep
Pre-processing step to replace a URL to a document into its actual content in
Base64GZip format. Supports URLs using http, https and ftp protocols.
Supports proxy on HTTP connection as set in System properties, but currently
no proxy on FTP connections.
This step takes all parameters from its base class
BaseTransformPostStep
and
the following additional parameters:
- prefix: Optional - The prefix to add to the column value to build
the URL.
- username: Optional - The username for the URL connection.
- password: Optional - The AES128 encrypted or unencrypted password.
Encrypted passwords are recognized by their ending with "=".
- failOnError: Optional - Indicate if the process fails if an error
occurs while retrieving a document (default:
false
). If
false
, an error is written to the log and the document content
is left empty).
This class is dependent on:
Here is an example of how to define this custom step in the TCC configuration
file.
- Author:
- Romain Guay, Oracle Corporation
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 |
Methods inherited from class com.taleo.integration.client.step.BaseCustomStep |
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 |
validatePipeline |
DocumentFromURLPreStep
public DocumentFromURLPreStep()
- Constructor without arguments.
getPrefix
public java.lang.String getPrefix()
- Returns:
setPrefix
public void setPrefix(java.lang.String prefix)
- Parameters:
prefix
-
getUsername
public java.lang.String getUsername()
- Returns:
setUsername
public void setUsername(java.lang.String username)
- Parameters:
username
-
getPassword
public java.lang.String getPassword()
- Returns:
setPassword
public void setPassword(java.lang.String password)
- Parameters:
password
-
isFailOnError
public boolean isFailOnError()
- Returns:
setFailOnError
public void setFailOnError(boolean failOnError)
- Parameters:
failOnError
-
getIdentifier
public java.lang.String getIdentifier()
- Specified by:
getIdentifier
in interface com.taleo.integration.client.step.CustomStep
- Specified by:
getIdentifier
in interface com.taleo.integration.client.step.Step
- Specified by:
getIdentifier
in class com.taleo.integration.client.step.BaseCustomStep
getDescription
public java.lang.String getDescription()
- Specified by:
getDescription
in interface com.taleo.integration.client.step.CustomStep
- Specified by:
getDescription
in interface com.taleo.integration.client.step.Step
- Specified by:
getDescription
in class com.taleo.integration.client.step.BaseCustomStep
getName
public java.lang.String getName()
- Specified by:
getName
in interface com.taleo.integration.client.step.CustomStep
- Specified by:
getName
in interface com.taleo.integration.client.step.Step
- Specified by:
getName
in class com.taleo.integration.client.step.BaseCustomStep
getSupportedPipeline
public com.taleo.ws.integration.client.SupportedPipeline getSupportedPipeline()
- Specified by:
getSupportedPipeline
in interface com.taleo.integration.client.step.Step
- Overrides:
getSupportedPipeline
in class BaseCustomCsvPostStep
init
public void init(com.taleo.ws.integration.client.GlobalConfig config)
- Overrides:
init
in class BaseTransformPostStep
execute
public void execute(com.taleo.ws.integration.client.Pipeline pipeline)
throws com.taleo.integration.client.step.StepException
- Specified by:
execute
in interface com.taleo.integration.client.step.Step
- Overrides:
execute
in class BaseTransformPostStep
- Throws:
com.taleo.integration.client.step.StepException
transform
protected java.lang.String transform(java.lang.String value)
- Transform the given value by getting the document content and rendering
it as Base64Gzip.
- Specified by:
transform
in class BaseTransformPostStep
- Parameters:
value
- The value to transform.
- Returns:
- The transformed value.
getFtpClient
protected org.apache.commons.net.ftp.FTPClient getFtpClient(java.net.URL url)
throws java.io.IOException
- Get the FTP Client.
Note: Must create a new client each time because the URL may be
different.
- Parameters:
url
-
- Returns:
-
- Throws:
java.io.IOException