|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.taleo.integration.client.customstep.lrd.RunDateManager
public class RunDateManager
RunDateManager that saves the last run dates on the file system.
It also exposes the current run date that is by default the local system date but can be taken from another date provider.
This class can be called from within a Java process or run in standalone mode to get/set the last run date in a file.
If the last run date is null, it is considered 1 day before now.
Field Summary | |
---|---|
static java.lang.String |
PIPELINE_KEY
Key for the RunDateManager in the pipeline. |
Constructor Summary | |
---|---|
RunDateManager(java.io.File file)
Constructor with the file to store the last run date. |
|
RunDateManager(java.io.File file,
DateProvider dateProvider)
Constructor with the file to store the last run date and the date provider. |
|
RunDateManager(java.io.File file,
DateProvider dateProvider,
double maxExtractDays)
Constructor with the file to store the last run date, the date provider and the maximum number of days to extract. |
|
RunDateManager(java.io.File file,
DateProvider dateProvider,
double maxExtractDays,
java.lang.String dateTimeMask)
Constructor with the file to store the last run date, the date provider and the maximum number of days to extract. |
Method Summary | |
---|---|
java.util.Date |
getDefaultLastRunDate()
Get the default last run date, which is 1 day before the current run date. |
java.util.Date |
getEffectiveLastRunDate()
Deprecated. Use getLastRunDate() instead. |
java.util.Date |
getEffectiveRunDate()
Get the effective run date used for filtering. |
java.io.File |
getFile()
Return the file where the last run date is stored. |
java.util.Date |
getLastRunDate()
Get the last run date. |
java.util.Date |
getRunDate()
Get the current run date. |
static void |
main(java.lang.String[] args)
Execute to get and/or set the last run date. |
protected java.util.Date |
maskDate(java.util.Date date)
Mask the given date. |
java.util.Date |
saveLastRunDate()
Save the effective run date as the new last run date. |
java.util.Date |
saveLastRunDate(java.util.Date date)
Save the given date as the new last run date. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PIPELINE_KEY
Constructor Detail |
---|
public RunDateManager(java.io.File file)
file
- The file to store the last run date.public RunDateManager(java.io.File file, DateProvider dateProvider)
file
- The file to store the last run date.dateProvider
- The date provider for the current date.public RunDateManager(java.io.File file, DateProvider dateProvider, double maxExtractDays)
file
- The file to store the last run date.dateProvider
- The date provider for the current date.maxExtractDays
- The maximum number of days to extract (0 means no maximum).public RunDateManager(java.io.File file, DateProvider dateProvider, double maxExtractDays, java.lang.String dateTimeMask)
file
- The file to store the last run date.dateProvider
- The date provider for the current date.maxExtractDays
- The maximum number of days to extract (0 means no maximum).dateTimeMask
- The date/time mask to apply to dates.Method Detail |
---|
public static void main(java.lang.String[] args)
Use the -help option to get usage description.
Exits with 0 on success and 1 in case of error.
args
- Argumentspublic java.io.File getFile()
public java.util.Date getRunDate()
public java.util.Date getLastRunDate()
java.io.IOException
public java.util.Date getEffectiveRunDate()
public java.util.Date getEffectiveLastRunDate()
java.io.IOException
public java.util.Date getDefaultLastRunDate()
public java.util.Date saveLastRunDate() throws java.io.IOException
java.io.IOException
public java.util.Date saveLastRunDate(java.util.Date date) throws java.io.IOException
java.io.IOException
protected java.util.Date maskDate(java.util.Date date)
date
- The date to be masked.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |