|
||||||||||
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.lrd.LRDPreStep
public class LRDPreStep
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:
SimpleDateFormat
and that is applied to the current run
date to make sure multiple successive extracts are synchronized on the same
current date. The default is set to "yyyy-MM-dd HH:mm:ss", which does no
synchronization. true
or false
, default: false
). maxExtractDays
). Setting this to true
will then be
used as a signal to end looping. It is also useful when rerunning a series of
extracts while skipping the ones that already ran successfully. The strategy
applies no matter if the query contains a Last Run Date filter or not.true
, a rerun will cause aborting the Java process with the
value 0 for exit code. The exit code can be set differently using the system
property named
com.taleo.client.customstep.LRDPreStep.RerunExitCode
.
Note: Exiting with a specific code is currently the only option to end TCC on demand. The down side is that the monitoring file remains incomplete.
LocalDateProvider
). This parameter must match one of the
following formats: "yyyy-MM-dd", "yyyy-MMM-dd", "yyyy-MMM-dd HH:mm:ss" or
"yyyy-MM-dd HH:mm:ss" and will be interpreted in the local time zone.
This date can be in the future only if abortOnRerun is false. Otherwise the process would not abort until the clock reaches that future date.
maxExtractDays
and maxExtractDuration
are
defined, maxExtractDays
will prevail.zone
dateTimeSource, because the config contains the
zone information (URL, username, password) to which the TCC API does not give
access directly.config
or query
, default:
config
).
config
: Choose this option if the LRD is stored by the
configuration file name, as with the standard TCC strategy.query
: Choose this option if the LRD is stored by the SQ-XML
query file name. This allows to run multiple extracts that use the LRD from
the same configuration.To use that strategy, the first extract in the series will reset the CRD (see resetCrd parameter) and the other ones will read it from that same file. Only the last extract in the series will contain the LRDPostStep.
true
or false
, default:
false
).true
or false
, default: false
).<quer:lrd tag="create"> <quer:field path="CreationDate"/> </quer:lrd>Setting this to
true
will turn off those other filters that are
not tagged as "create". If the query has no LRD filter tagged as "create",
this option does nothing.
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;
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 |
---|
public static final java.lang.String DEFAULT_DATETIME_SOURCE
public static final java.lang.String DEFAULT_LRD_NAMING
public static final java.lang.String DEFAULT_DATETIME_MASK
Constructor Detail |
---|
public LRDPreStep()
Method Detail |
---|
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 getDateTimeMask()
public void setDateTimeMask(java.lang.String dateTimeMask)
dateTimeMask
- public boolean isAbortOnRerun()
public void setAbortOnRerun(boolean abortOnRerun)
abortOnRerun
- public java.lang.String getDateTimeSource()
public void setDateTimeSource(java.lang.String dateTimeSource)
dateTimeSource
- public java.lang.String getConfigFile()
public void setConfigFile(java.lang.String configFile)
configFile
- public java.lang.String getLrdNaming()
public void setLrdNaming(java.lang.String lrdNaming)
lrdNaming
- public java.lang.String getLrdFilename()
public void setLrdFilename(java.lang.String lrdFilename)
lrdFilename
- public java.lang.String getCrdFilename()
public void setCrdFilename(java.lang.String crdFilename)
crdFilename
- public boolean isResetCrd()
public void setResetCrd(boolean resetCrd)
resetCrd
- public java.util.Date getCurrentRunDate()
public void setCurrentRunDate(java.util.Date currentRunDate)
currentRunDate
- public double getMaxExtractDays()
public void setMaxExtractDays(double maxExtractDays)
maxExtractDays
- public javax.xml.datatype.Duration getMaxExtractDuration()
public void setMaxExtractDuration(javax.xml.datatype.Duration maxExtractDuration)
maxExtractDuration
- public boolean isCreateOnly()
public void setCreateOnly(boolean createOnly)
createOnly
- 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 transform_CreateOnly(java.io.File queryFile, java.io.File outFile) throws javax.xml.transform.TransformerException, java.io.IOException
queryFile
- The query file.outFile
- The output file.
javax.xml.transform.TransformerException
java.io.IOException
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
queryFile
- The query file.outFile
- The output file.beginDate
- The filter begin date.endDate
- The filter end date.
javax.xml.transform.TransformerException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |