com.taleo.integration.client.customstep.xml
Class AbstractXslStep

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.xml.AbstractXslStep
All Implemented Interfaces:
com.taleo.integration.client.step.CustomStep, com.taleo.integration.client.step.Step
Direct Known Subclasses:
XslPostStep, XslPreStep

public abstract class AbstractXslStep
extends BaseCustomStep

Post-processing step to apply an XSL transformation to the result.

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

This step differs from the TCC built-in XSL transformation step in four ways:

This class is dependent on:

It also depends on the following library if the record looping strategy is used.

Author:
Romain Guay, Taleo Corporation

Field Summary
protected  java.lang.String outputFile
          The output file name.
protected  com.taleo.ws.integration.client.MessageFormat.Enum outputFormat
          The output format.
protected  java.lang.String recordXPath
          The record XPath.
protected  java.lang.String templateFile
          The template filename.
protected  java.lang.String xslFile
          The XSL file name.
protected  java.util.Properties xslParameters
          The XSL parameters.
 
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
AbstractXslStep()
          Constructor without arguments.
 
Method Summary
protected  void execute(java.io.File inputFile, java.io.File outputFile)
          Execute the XSL transformation.
 java.lang.String getOutputFile()
          Get the output file.
 com.taleo.ws.integration.client.MessageFormat.Enum getOutputFormat()
          Get the output format.
 java.lang.String getRecordXPath()
          Get the XPath expression for the records.
 java.lang.String getTemplateFile()
          Get the template filename.
 java.lang.String getXslFile()
          Get the XSL file.
 java.lang.String getXslParameter(java.lang.String name)
          Get the XSL parameter by its name.
 void init(com.taleo.ws.integration.client.GlobalConfig config)
           
 void setOutputFile(java.lang.String outputFile)
          Set the output file.
 void setOutputFormat(com.taleo.ws.integration.client.MessageFormat.Enum outputFormat)
          Set the output format.
 void setRecordXPath(java.lang.String recordXPath)
          Set the XPath expression for the records.
 void setTemplateFile(java.lang.String templateFile)
          Set the template filename.
 void setXslFile(java.lang.String xslFile)
          Set the XSL file.
 void setXslParameter(java.lang.String name, java.lang.String value)
          Set the XSL parameter by its name.
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
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

xslFile

protected java.lang.String xslFile
The XSL file name.


outputFile

protected java.lang.String outputFile
The output file name.


outputFormat

protected com.taleo.ws.integration.client.MessageFormat.Enum outputFormat
The output format.


xslParameters

protected java.util.Properties xslParameters
The XSL parameters.


recordXPath

protected java.lang.String recordXPath
The record XPath.


templateFile

protected java.lang.String templateFile
The template filename.

Constructor Detail

AbstractXslStep

public AbstractXslStep()
Constructor without arguments.

Method Detail

validateParameterNames

protected void validateParameterNames()
Validate the parameters names.

Override the default method to allow for extra parameters to be passed to the XSL transformation.

Overrides:
validateParameterNames in class BaseCustomStep

getXslFile

public java.lang.String getXslFile()
Get the XSL file.

Returns:

setXslFile

public void setXslFile(java.lang.String xslFile)
Set the XSL file.

Parameters:
xslFile -

getOutputFile

public java.lang.String getOutputFile()
Get the output file.

Returns:

setOutputFile

public void setOutputFile(java.lang.String outputFile)
Set the output file.

Parameters:
outputFile -

getOutputFormat

public com.taleo.ws.integration.client.MessageFormat.Enum getOutputFormat()
Get the output format.

Returns:

setOutputFormat

public void setOutputFormat(com.taleo.ws.integration.client.MessageFormat.Enum outputFormat)
Set the output format.

Parameters:
outputFormat -

getXslParameter

public java.lang.String getXslParameter(java.lang.String name)
Get the XSL parameter by its name.

Parameters:
name -
Returns:

setXslParameter

public void setXslParameter(java.lang.String name,
                            java.lang.String value)
Set the XSL parameter by its name.

Parameters:
name -
value -

getRecordXPath

public java.lang.String getRecordXPath()
Get the XPath expression for the records.

Returns:

setRecordXPath

public void setRecordXPath(java.lang.String recordXPath)
Set the XPath expression for the records.

Parameters:
recordXPath -

getTemplateFile

public java.lang.String getTemplateFile()
Get the template filename.

Returns:

setTemplateFile

public void setTemplateFile(java.lang.String templateFile)
Set the template filename.

Parameters:
templateFile -

init

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

execute

protected void execute(java.io.File inputFile,
                       java.io.File outputFile)
                throws javax.xml.transform.TransformerException,
                       java.io.IOException,
                       javax.xml.parsers.ParserConfigurationException,
                       org.xml.sax.SAXException,
                       org.dom4j.DocumentException
Execute the XSL transformation.

Parameters:
inputFile - The input file.
outputFile - The output file.
Throws:
javax.xml.transform.TransformerException
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
org.dom4j.DocumentException