com.taleo.integration.client.customstep.lrd
Class LRDPreStep

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.lrd.LRDPreStep
All Implemented Interfaces:
com.taleo.integration.client.step.CustomStep, com.taleo.integration.client.step.Step

public class LRDPreStep
extends BaseCustomStep

Pre-processing step to substitute a "Last Run Date (LRD)" filter at runtime with a "Between" filter in which the current and last run dates have been modified with a mask that allows to synchronize multiple extracts on a specific datetime in the past.

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

This pre-processing step must be defined before the 'Prepare Export' step. It works in pair with LRDPostStep. It can be safely applied to a query that has no LRD filter, in which case it has no effect.

Here are some examples of how to define this custom step in the TCC configuration file;

Author:
Romain Guay, Taleo Corporation

Field Summary
static java.lang.String DEFAULT_DATETIME_MASK
          Default datetime mask.
static java.lang.String DEFAULT_DATETIME_SOURCE
          Default datetime source.
static java.lang.String DEFAULT_LRD_NAMING
          Default lRD naming strategy.
 
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
LRDPreStep()
          Constructor without arguments.
 
Method Summary
 void execute(com.taleo.ws.integration.client.Pipeline pipeline)
           
 java.lang.String getConfigFile()
          Deprecated.  
 java.lang.String getCrdFilename()
          Get the CRD filename.
 java.util.Date getCurrentRunDate()
          Get the current run date.
 java.lang.String getDateTimeMask()
          Get the datetime mask.
 java.lang.String getDateTimeSource()
          Deprecated.  
 java.lang.String getDescription()
           
 java.lang.String getIdentifier()
           
 java.lang.String getLrdFilename()
          Get the LRD filename.
 java.lang.String getLrdNaming()
          Deprecated.  
 double getMaxExtractDays()
          Get the maximum number of days to extract.
 javax.xml.datatype.Duration getMaxExtractDuration()
          Deprecated.  
 java.lang.String getName()
           
 void init(com.taleo.ws.integration.client.GlobalConfig config)
           
 boolean isAbortOnRerun()
          Get the abort on rerun flag.
 boolean isCreateOnly()
          Get the createOnly flag.
 boolean isResetCrd()
          Get the resetCrd flag.
 void setAbortOnRerun(boolean abortOnRerun)
          Set the abort on rerun flag.
 void setConfigFile(java.lang.String configFile)
          Deprecated.  
 void setCrdFilename(java.lang.String crdFilename)
          Set the CRD filename.
 void setCreateOnly(boolean createOnly)
          Set the createOnly flag.
 void setCurrentRunDate(java.util.Date currentRunDate)
          Set the current run date.
 void setDateTimeMask(java.lang.String dateTimeMask)
          Set the datetime mask.
 void setDateTimeSource(java.lang.String dateTimeSource)
          Deprecated.  
 void setLrdFilename(java.lang.String lrdFilename)
          Set the LRD filename.
 void setLrdNaming(java.lang.String lrdNaming)
          Deprecated.  
 void setMaxExtractDays(double maxExtractDays)
          Set the maximum number of days to extract.
 void setMaxExtractDuration(javax.xml.datatype.Duration maxExtractDuration)
          Deprecated.  
 void setResetCrd(boolean resetCrd)
          Set the resetCrd flag.
protected  void transform_CreateOnly(java.io.File queryFile, java.io.File outFile)
          Transform LRD filters to manage createOnly option.
protected  void transform_LRD(java.io.File queryFile, java.io.File outFile, java.util.Date beginDate, java.util.Date endDate)
          Transform LRD filters into Between filters using the specified begin and end dates.
 
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
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
validatePipeline
 

Field Detail

DEFAULT_DATETIME_SOURCE

public static final java.lang.String DEFAULT_DATETIME_SOURCE
Default datetime source.

See Also:
Constant Field Values

DEFAULT_LRD_NAMING

public static final java.lang.String DEFAULT_LRD_NAMING
Default lRD naming strategy.

See Also:
Constant Field Values

DEFAULT_DATETIME_MASK

public static final java.lang.String DEFAULT_DATETIME_MASK
Default datetime mask.

See Also:
Constant Field Values
Constructor Detail

LRDPreStep

public LRDPreStep()
Constructor without arguments.

Method Detail

getIdentifier

public java.lang.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 java.lang.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 java.lang.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

getDateTimeMask

public java.lang.String getDateTimeMask()
Get the datetime mask.

Returns:

setDateTimeMask

public void setDateTimeMask(java.lang.String dateTimeMask)
Set the datetime mask.

Parameters:
dateTimeMask -

isAbortOnRerun

public boolean isAbortOnRerun()
Get the abort on rerun flag.

Returns:

setAbortOnRerun

public void setAbortOnRerun(boolean abortOnRerun)
Set the abort on rerun flag.

Parameters:
abortOnRerun -

getDateTimeSource

public java.lang.String getDateTimeSource()
Deprecated. 

Get the datetime source.

Returns:

setDateTimeSource

public void setDateTimeSource(java.lang.String dateTimeSource)
Deprecated. 

Set the datetime source.

Parameters:
dateTimeSource -

getConfigFile

public java.lang.String getConfigFile()
Deprecated. 

Get the config file.

Returns:

setConfigFile

public void setConfigFile(java.lang.String configFile)
Deprecated. 

Set the config file.

Parameters:
configFile -

getLrdNaming

public java.lang.String getLrdNaming()
Deprecated. 

Get the LRD naming strategy.

Returns:

setLrdNaming

public void setLrdNaming(java.lang.String lrdNaming)
Deprecated. 

Set the LRD naming strategy.

Parameters:
lrdNaming -

getLrdFilename

public java.lang.String getLrdFilename()
Get the LRD filename.

Returns:

setLrdFilename

public void setLrdFilename(java.lang.String lrdFilename)
Set the LRD filename.

Parameters:
lrdFilename -

getCrdFilename

public java.lang.String getCrdFilename()
Get the CRD filename.

Returns:

setCrdFilename

public void setCrdFilename(java.lang.String crdFilename)
Set the CRD filename.

Parameters:
crdFilename -

isResetCrd

public boolean isResetCrd()
Get the resetCrd flag.

Returns:

setResetCrd

public void setResetCrd(boolean resetCrd)
Set the resetCrd flag.

Parameters:
resetCrd -

getCurrentRunDate

public java.util.Date getCurrentRunDate()
Get the current run date.

Returns:

setCurrentRunDate

public void setCurrentRunDate(java.util.Date currentRunDate)
Set the current run date.

Parameters:
currentRunDate -

getMaxExtractDays

public double getMaxExtractDays()
Get the maximum number of days to extract.

Returns:

setMaxExtractDays

public void setMaxExtractDays(double maxExtractDays)
Set the maximum number of days to extract.

Parameters:
maxExtractDays -

getMaxExtractDuration

public javax.xml.datatype.Duration getMaxExtractDuration()
Deprecated. 

Get the maximum duration to extract.

Returns:
The duration or null if none was set.

setMaxExtractDuration

public void setMaxExtractDuration(javax.xml.datatype.Duration maxExtractDuration)
Deprecated. 

Set the maximum duration to extract.

Parameters:
maxExtractDuration -

isCreateOnly

public boolean isCreateOnly()
Get the createOnly flag.

Returns:

setCreateOnly

public void setCreateOnly(boolean createOnly)
Set the createOnly flag.

Parameters:
createOnly -

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_CreateOnly

protected void transform_CreateOnly(java.io.File queryFile,
                                    java.io.File outFile)
                             throws javax.xml.transform.TransformerException,
                                    java.io.IOException
Transform LRD filters to manage createOnly option.

Parameters:
queryFile - The query file.
outFile - The output file.
Throws:
javax.xml.transform.TransformerException
java.io.IOException

transform_LRD

protected void transform_LRD(java.io.File queryFile,
                             java.io.File outFile,
                             java.util.Date beginDate,
                             java.util.Date endDate)
                      throws javax.xml.transform.TransformerException,
                             java.io.IOException
Transform LRD filters into Between filters using the specified begin and end dates.

Parameters:
queryFile - The query file.
outFile - The output file.
beginDate - The filter begin date.
endDate - The filter end date.
Throws:
javax.xml.transform.TransformerException
java.io.IOException