|
||||||||||
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.csv.BaseCustomCsvStep
com.taleo.integration.client.customstep.csv.BaseCustomCsvPostStep
com.taleo.integration.client.customstep.csv.BaseHeaderFooterPostStep
public abstract class BaseHeaderFooterPostStep
Abstract post-processing step to add a header and/or footer to a CSV file.
This step takes all parameters from its base class
BaseCustomCsvPostStep
and
the following additional parameters:
headerTemplateFile
if the template is
very short. If both are present, this one has priority.footerTemplateFile
if the template is
very short. If both are present, this one has priority.Details of the variables available to write the template are specific to concrete subclasses of this one.
The files can be specified as an absolute path or relative to the working directory.
This class and its subclasses are dependent on the Apache Velocity library version 1.5.
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 | |
---|---|
BaseHeaderFooterPostStep()
Constructor without arguments. |
Method Summary | |
---|---|
protected abstract org.apache.velocity.VelocityContext |
createContext(java.io.File file,
java.io.File targetFile)
Create the Velocity context with the given file and target file. |
void |
execute(java.io.File inFile,
java.io.File outFile)
Copy the input file to the output file while adding the header and/or footer. |
void |
execute(java.io.File inFile,
java.io.File outFile,
java.io.File targetFile)
Copy the input file to the output file while adding the header and/or footer. |
java.lang.String |
getFooterTemplate()
|
java.lang.String |
getFooterTemplateFile()
|
java.lang.String |
getHeaderTemplate()
|
java.lang.String |
getHeaderTemplateFile()
|
void |
init(com.taleo.ws.integration.client.GlobalConfig config)
|
void |
setFooterTemplate(java.lang.String template)
|
void |
setFooterTemplateFile(java.lang.String templateFile)
|
void |
setHeaderTemplate(java.lang.String template)
|
void |
setHeaderTemplateFile(java.lang.String templateFile)
|
protected void |
writeFooter(org.apache.velocity.app.VelocityEngine velocity,
org.apache.velocity.VelocityContext context,
java.io.BufferedWriter writer)
Write the footer in the given writer. |
protected void |
writeHeader(org.apache.velocity.app.VelocityEngine velocity,
org.apache.velocity.VelocityContext context,
java.io.BufferedWriter writer)
Write the header in the given writer. |
Methods inherited from class com.taleo.integration.client.customstep.csv.BaseCustomCsvPostStep |
---|
getSupportedPipeline |
Methods inherited from class com.taleo.integration.client.customstep.csv.BaseCustomCsvStep |
---|
execute, getColumnIndex, getColumnName, getCsvDelimiter, getCsvQuoteCharacter, isCsvHeaderPresent, setCsvDelimiter, setCsvHeaderPresent, setCsvQuoteCharacter |
Methods inherited from class com.taleo.integration.client.customstep.BaseCustomStep |
---|
createTempFile, createTempFile, getEncoding, getTempFolder, isActive, registerParameterName, setActive, setEncoding, validateParameterNames |
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 |
Constructor Detail |
---|
public BaseHeaderFooterPostStep()
Method Detail |
---|
public java.lang.String getHeaderTemplateFile()
public void setHeaderTemplateFile(java.lang.String templateFile)
templateFile
- public java.lang.String getHeaderTemplate()
public void setHeaderTemplate(java.lang.String template)
template
- public java.lang.String getFooterTemplateFile()
public void setFooterTemplateFile(java.lang.String templateFile)
templateFile
- public java.lang.String getFooterTemplate()
public void setFooterTemplate(java.lang.String template)
template
- public void init(com.taleo.ws.integration.client.GlobalConfig config)
init
in class BaseCustomCsvStep
public void execute(java.io.File inFile, java.io.File outFile) throws java.lang.Exception
inFile
- The input fileoutFile
- The output file
java.lang.Exception
public void execute(java.io.File inFile, java.io.File outFile, java.io.File targetFile) throws java.lang.Exception
inFile
- The input fileoutFile
- The output filetargetFile
- The target results file for the integration. This is used to
allow using the file name and path as variables in the
Velocity templates.
java.lang.Exception
protected abstract org.apache.velocity.VelocityContext createContext(java.io.File file, java.io.File targetFile) throws java.io.IOException
file
- The file containing the data before adding the header and
footer.targetFile
- The target results file for this integration.
java.io.IOException
protected void writeHeader(org.apache.velocity.app.VelocityEngine velocity, org.apache.velocity.VelocityContext context, java.io.BufferedWriter writer) throws java.io.IOException
velocity
- The Velocity engine.context
- The Velocity context.writer
- The writer.
java.io.IOException
protected void writeFooter(org.apache.velocity.app.VelocityEngine velocity, org.apache.velocity.VelocityContext context, java.io.BufferedWriter writer) throws java.io.IOException
velocity
- The Velocity engine.context
- The Velocity context.writer
- The writer.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |