|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.taleo.integration.client.step.BaseStep
com.taleo.integration.client.step.BaseCustomStep
com.taleo.integration.client.customstep.BaseCustomStep
com.taleo.integration.client.customstep.xml.SplitFilePostStep
public class SplitFilePostStep
Post-processing step to split the XML result file into one file for each record.
This step takes all parameters from its base class
BaseCustomStep
and offers two
different APIs.
The primary API consumes an XML document with the following structure and produces one file for each <File> tag. File content must be in XML format included in CDATA section. It can be further transformed using XSL if needed (see below).
<files> <file path="..."> <![CDATA[... file content ...]]> </file> </files>Where:
The second API uses the following parameters:
SimpleDateFormat
for details.
It can use the same $date and $index variables as the filenameXPath.
Examples:
All XPath expressions must not use wildcards and must use the same namespace prefixes that are declared in the document, except for the default namespace for which the prefix 'default' must be used instead of no prefix. This 'default' prefix may be replaced if needed, by setting the 'com.taleo.integration.client.xml.default.ns.prefix' system property.
This class is dependent on:
Here is an example of how to define this custom step in the TCC configuration file, using the primary API:
Here is an example of how to define this custom step in the TCC configuration file, using the secondary API:
Field Summary |
---|
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 | |
---|---|
SplitFilePostStep()
Constructor without arguments. |
Method Summary | |
---|---|
protected void |
execute(java.io.File inputFile)
Split the input file. |
void |
execute(com.taleo.ws.integration.client.Pipeline pipeline)
|
java.text.DateFormat |
getDateFormat()
Get the date format. |
java.lang.String |
getDescription()
|
java.lang.String |
getFilenameXPath()
Get the XPath expression for filename. |
java.lang.String |
getIdentifier()
|
java.lang.String |
getName()
|
java.lang.String |
getOutputDirectory()
Deprecated. Use getOutputDirectoryXPath instead. |
java.lang.String |
getOutputDirectoryXPath()
Get the output directory XPath. |
java.lang.String |
getRecordXPath()
Get the XPath expression for the records. |
com.taleo.ws.integration.client.SupportedPipeline |
getSupportedPipeline()
|
java.lang.String |
getXslFile()
Get the XSL file. |
java.util.Properties |
getXslParameters()
Get the XSL parameters. |
void |
init(com.taleo.ws.integration.client.GlobalConfig config)
|
void |
setDateFormat(java.text.DateFormat dateFormat)
Set the date format. |
void |
setFilenameXPath(java.lang.String filenameXPath)
Set the XPath expression for filename. |
void |
setOutputDirectory(java.lang.String outputDirectory)
Deprecated. Use setOutputDirectoryXPath instead. |
void |
setOutputDirectoryXPath(java.lang.String outputDirectoryXPath)
Set the output directory XPath. |
void |
setRecordXPath(java.lang.String recordXPath)
Set the XPath expression for the records. |
void |
setXslFile(java.lang.String xslFile)
Set the XSL file. |
protected void |
validateParameterNames()
Validate the parameters names. |
Methods inherited from class com.taleo.integration.client.customstep.BaseCustomStep |
---|
createTempFile, createTempFile, getEncoding, getTempFolder, isActive, registerParameterName, setActive, setEncoding |
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 |
Constructor Detail |
---|
public SplitFilePostStep()
Method Detail |
---|
protected void validateParameterNames()
Override the default method to allow for extra parameters to be passed to the XSL transformation.
validateParameterNames
in class BaseCustomStep
public java.lang.String getIdentifier()
getIdentifier
in interface com.taleo.integration.client.step.CustomStep
getIdentifier
in interface com.taleo.integration.client.step.Step
getIdentifier
in class com.taleo.integration.client.step.BaseCustomStep
public java.lang.String getDescription()
getDescription
in interface com.taleo.integration.client.step.CustomStep
getDescription
in interface com.taleo.integration.client.step.Step
getDescription
in class com.taleo.integration.client.step.BaseCustomStep
public java.lang.String getName()
getName
in interface com.taleo.integration.client.step.CustomStep
getName
in interface com.taleo.integration.client.step.Step
getName
in class com.taleo.integration.client.step.BaseCustomStep
public java.lang.String getRecordXPath()
public void setRecordXPath(java.lang.String recordXPath)
recordXPath
- public java.lang.String getFilenameXPath()
public void setFilenameXPath(java.lang.String filenameXPath)
filenameXPath
- public java.text.DateFormat getDateFormat()
public void setDateFormat(java.text.DateFormat dateFormat)
dateFormat
- public java.lang.String getOutputDirectory()
public void setOutputDirectory(java.lang.String outputDirectory)
outputDirectory
- public java.lang.String getOutputDirectoryXPath()
public void setOutputDirectoryXPath(java.lang.String outputDirectoryXPath)
outputDirectoryXPath
- public java.lang.String getXslFile()
public void setXslFile(java.lang.String xslFile)
xslFile
- public java.util.Properties getXslParameters()
public com.taleo.ws.integration.client.SupportedPipeline getSupportedPipeline()
getSupportedPipeline
in interface com.taleo.integration.client.step.Step
getSupportedPipeline
in class com.taleo.integration.client.step.BaseCustomStep
public void init(com.taleo.ws.integration.client.GlobalConfig config)
init
in class BaseCustomStep
public void execute(com.taleo.ws.integration.client.Pipeline pipeline) throws com.taleo.integration.client.step.StepException
com.taleo.integration.client.step.StepException
protected void execute(java.io.File inputFile) throws javax.xml.transform.TransformerConfigurationException, org.dom4j.DocumentException, javax.xml.parsers.ParserConfigurationException, java.io.IOException
inputFile
- The input file.
javax.xml.transform.TransformerConfigurationException
org.dom4j.DocumentException
javax.xml.parsers.ParserConfigurationException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |