com.taleo.integration.client.customstep.dev
Class ConvertToCountPreStep
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.dev.ConvertToCountPreStep
- All Implemented Interfaces:
- com.taleo.integration.client.step.CustomStep, com.taleo.integration.client.step.Step
public class ConvertToCountPreStep
- extends BaseCustomStep
Pre-processing step to convert any query to a count query with the result in
CSV format.
This step takes two parameters (active and NOTE) from its base
class BaseCustomStep
and the
following additional parameter:
- csvHeaderPresent: Indicates if a CSV header is to be displayed in
CSV mode. Default is
false
.
This class applies to pretty much any query, but there are cases where we
want or need to exclude a projection from the count. To do this, we can
simply add a tag "exclude-from-count" to the <quer:projection>, for
example:
<quer:projection tag="exclude-from-count">
<quer:field path="AttachedFiles,Content"/>
</quer:projection>
This step must be defined before the 'Prepare Export' step.
This class is dependent on:
- Apache Commons Lang
(commons-lang-2.4.jar)
Here is an example of how to define this custom step in the TCC configuration
file;
- 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 |
Methods inherited from class com.taleo.integration.client.step.BaseCustomStep |
getSupportedPipeline, getType, init |
Methods inherited from class com.taleo.integration.client.step.BaseStep |
getAllProcessSupportPipeline, getCurrentFile, getCurrentFile, getCurrentMessage, getPostProcessSupportPipeline, getPreProcessSupportPipeline, 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 |
ConvertToCountPreStep
public ConvertToCountPreStep()
- Constructor without arguments.
getIdentifier
public 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 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 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
isCsvHeaderPresent
public boolean isCsvHeaderPresent()
- Get the CSV header present indicator.
- Returns:
setCsvHeaderPresent
public void setCsvHeaderPresent(boolean csvHeaderPresent)
- Set the CSV header present indicator.
- Parameters:
csvHeaderPresent
-
init
public void init(com.taleo.ws.integration.client.GlobalConfig config)
- Overrides:
init
in class BaseCustomStep
execute
public void execute(com.taleo.ws.integration.client.Pipeline pipeline)
throws com.taleo.integration.client.step.StepException
- Throws:
com.taleo.integration.client.step.StepException
transform
protected void transform(File queryFile,
File outFile)
throws TransformerException
- Transform the query file containing into a count query.
- Parameters:
queryFile
- The query file.outFile
- The output file.
- Throws:
TransformerException