|
||||||||||
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.compress.ZipPostStep
public class ZipPostStep
Post-processing step to zip the current workflow file or other files corresponding to a pattern.
This step takes all parameters from its base class
BaseCustomStep
and the
following additional parameters:
WildcardFileFilter
in the file names
only. Pattern is case sensitive. If absent, the current workflow document is
zipped.true
or false
, default:
true
)This class is dependent on:
Here are two examples of how to define this custom step in the TCC configuration file:
java.util.zip
Field Summary | |
---|---|
protected int |
method
The compression method. |
int |
METHOD_DEFLATED
The compression methods. |
int |
METHOD_STORED
|
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 | |
---|---|
ZipPostStep()
Constructor without arguments. |
Method Summary | |
---|---|
void |
execute(com.taleo.ws.integration.client.Pipeline pipeline)
|
java.lang.String |
getDescription()
|
java.lang.String |
getFilePattern()
Get the file pattern. |
java.lang.String |
getIdentifier()
|
int |
getMethod()
Get the compression method. |
java.lang.String |
getName()
|
java.lang.String |
getOutputFile()
Get the output file. |
com.taleo.ws.integration.client.SupportedPipeline |
getSupportedPipeline()
|
void |
init(com.taleo.ws.integration.client.GlobalConfig config)
|
boolean |
isDeleteOriginal()
Get the delete original flag. |
void |
setDeleteOriginal(boolean deleteOriginal)
Set the delete original flag. |
void |
setFilePattern(java.lang.String filePattern)
Set the file pattern. |
void |
setMethod(int method)
Set the compression method (METHOD_DEFLATED or METHOD_STORED). |
void |
setOutputFile(java.lang.String outputFile)
Set the output file. |
protected void |
zip(java.io.File pattern,
java.io.File zipFile,
boolean deleteOriginal)
Zip the files matching the file pattern into the given zip file. |
protected void |
zip(java.io.File file,
java.io.File base,
java.util.zip.ZipOutputStream os)
Zip a file or folder in the given output stream. |
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 |
---|
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 |
Field Detail |
---|
public final int METHOD_DEFLATED
public final int METHOD_STORED
protected int method
Constructor Detail |
---|
public ZipPostStep()
Method Detail |
---|
public java.lang.String getFilePattern()
public void setFilePattern(java.lang.String filePattern)
filePattern
- public java.lang.String getOutputFile()
public void setOutputFile(java.lang.String outputFile)
outputFile
- public int getMethod()
public void setMethod(int method)
method
- public boolean isDeleteOriginal()
public void setDeleteOriginal(boolean deleteOriginal)
deleteOriginal
- 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 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 zip(java.io.File pattern, java.io.File zipFile, boolean deleteOriginal) throws java.io.IOException
pattern
- The file pattern to select folder or files.zipFile
- The resulting zip file.deleteOriginal
- Delete the original files after compression.
java.io.IOException
protected void zip(java.io.File file, java.io.File base, java.util.zip.ZipOutputStream os) throws java.io.IOException
file
- The file or folder name.base
- Base file to relativize filenames in the Zip.os
- The output stream.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |