com.taleo.integration.client.customstep.csv
Class BaseTransformPostStep
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
- All Implemented Interfaces:
- com.taleo.integration.client.step.CustomStep, com.taleo.integration.client.step.Step
- Direct Known Subclasses:
- DecodePostStep, DigestPostStep, DocumentFromURLPreStep, RemoveHTMLPostStep, ReplacePostStep
public abstract class BaseTransformPostStep
- extends BaseCustomCsvPostStep
Abstract post-processing step to transform a column in a CSV file containing
the results of an export.
This step takes all parameters from its base class
BaseCustomCsvPostStep
and
the following additional parameters:
- column: The name or index (0 based) of the source column. The
column name can be used only if the results file contains a CSV header row.
- overwrite: Indicates if the value in the source column is
overwritten (
true
or false
, default:
true
).
- targetIndex: The index (0 based) of the target column. The default
value is the index of the source column.
- If overwrite =
true
, will overwrite the content of the
target column.
- If overwrite =
false
, will insert a new column at the given
index.
- targetName: The name of the target column. Default: The name of
the source column. If the results file has no CSV header row, this has no
effect.
- Author:
- Romain Guay, Taleo 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 |
Method Summary |
void |
execute(java.io.File inFile,
java.io.File outFile)
Copy the input file to the output file while applying the required
transformation. |
void |
execute(com.taleo.ws.integration.client.Pipeline pipeline)
|
java.lang.String |
getColumn()
|
int |
getTargetIndex()
|
java.lang.String |
getTargetName()
|
void |
init(com.taleo.ws.integration.client.GlobalConfig config)
|
boolean |
isOverwrite()
|
void |
setColumn(java.lang.String column)
|
void |
setOverwrite(boolean overwrite)
|
void |
setTargetIndex(int targetIndex)
|
void |
setTargetName(java.lang.String targetName)
|
protected abstract java.lang.String |
transform(java.lang.String value)
Transform the given value. |
Methods inherited from class com.taleo.integration.client.step.BaseCustomStep |
getDescription, getIdentifier, getName, 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 |
BaseTransformPostStep
public BaseTransformPostStep()
- Constructor without arguments.
getColumn
public java.lang.String getColumn()
- Returns:
setColumn
public void setColumn(java.lang.String column)
- Parameters:
column
-
isOverwrite
public boolean isOverwrite()
- Returns:
setOverwrite
public void setOverwrite(boolean overwrite)
- Parameters:
overwrite
-
getTargetIndex
public int getTargetIndex()
- Returns:
setTargetIndex
public void setTargetIndex(int targetIndex)
- Parameters:
targetIndex
-
getTargetName
public java.lang.String getTargetName()
- Returns:
setTargetName
public void setTargetName(java.lang.String targetName)
- Parameters:
targetName
-
init
public void init(com.taleo.ws.integration.client.GlobalConfig config)
- Overrides:
init
in class BaseCustomCsvStep
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 BaseCustomCsvStep
- Throws:
com.taleo.integration.client.step.StepException
execute
public void execute(java.io.File inFile,
java.io.File outFile)
throws java.io.IOException,
InvalidCSVFileFormat
- Copy the input file to the output file while applying the required
transformation.
- Parameters:
inFile
- The input fileoutFile
- The output file
- Throws:
java.io.IOException
InvalidCSVFileFormat
transform
protected abstract java.lang.String transform(java.lang.String value)
- Transform the given value.
- Parameters:
value
- The value to transform.
- Returns:
- The transformed value.