Package net.simplace.pipe.processors
Class DateListCreatorProcessor
java.lang.Object
net.simplace.pipe.control.FWProcessor
net.simplace.pipe.processors.DateListCreatorProcessor
This processor takes an start date and generates a
Collection
of dates.
Following parameters are available:
startDate
(mandatory)
First date put in the collection.startDateFormat
(optional)
ADateFormat
representation thestartDate
is given in (Default: "YYYY-MM-DD")endDate
|dayCount
(mandatory) End-Date in the same format asstartDate
or the number of dates as an integer value.stepSize
(optional) The step size (in days) the dates are generated in (Default: 1)resultParamKey
(mandatory) The map key the resultingCollection
is stored in.resultElementFormat
(optional) The format theCollection
elements are stored in. Supported values are:java.time.LocalDateTime
, so that the result is aCollection<Date>
- a string representation of
DateFormat
, so that the result is aCollection<String>
startDate
)
- Version:
- 1.0
- Author:
- Martin Schmitz
-
Field Summary
Modifier and TypeFieldDescriptionstatic final long
A day represented in milli seconds.static final String
Constant for in-channel parameter key "dayCount".static final String
Constant for in-channel parameter key "endDate".static final String
Constant for in-channel parameter key "dayCount".static final String
Constant for in-channel parameter key "startDate".static final String
Constant for in-channel parameter key "startDate".static final String
Constant for in-channel parameter key "stepSize".static final String
Constant for in-channel parameter key "resultParamKey".Fields inherited from class net.simplace.pipe.control.FWProcessor
iAllreadyLoopedCount, iContainer, iInObservable, iObservable, iProgressTasks
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks whether the in-channel contains all required parameters.protected boolean
process()
Stores day in the outputCollection
.protected void
putFormatedDateCollection
(LocalDateTime aDate, Collection aDestCol) Converts a date given in milli seconds to the output format (given by parameter 'resultElementFormat') and puts it to the collection.Methods inherited from class net.simplace.pipe.control.FWProcessor
checkOutParameterMap, clone, containsParameter, createProcessor, createProcessor, fireTaskEvent, getAllStringInParameters, getConfiguration, getInitialParameters, getInParameter, getInParameter, getInParameters, getNewProgressTask, getOutParameter, getOutParameterKeys, getPipeLine, getProgressTask, getStringInParameter, getStringInParameter, getSystemID, hasConfiguration, isEndOfPipe, pipe, removeOutParameter, setConfiguration, setEndOfPipeFlag, setInitialParameters, setInParameterMap, setLoopedCount, setOutParameter, setStateOfTask, setStateProgressing, toXML
-
Field Details
-
DAY_IN_MILLIES
public static final long DAY_IN_MILLIESA day represented in milli seconds.- See Also:
-
INKEY_START_DATE
Constant for in-channel parameter key "startDate".- See Also:
-
INKEY_START_DATE_FORMAT
Constant for in-channel parameter key "startDate".- See Also:
-
INKEY_END_DATE
Constant for in-channel parameter key "endDate".- See Also:
-
INKEY_DAY_COUNT
Constant for in-channel parameter key "dayCount".- See Also:
-
INKEY_STEP_SIZE
Constant for in-channel parameter key "stepSize".- See Also:
-
INKEY_RESULT_FORMAT
Constant for in-channel parameter key "dayCount".- See Also:
-
OUTKEY_RESULT_PARAM_KEY
Constant for in-channel parameter key "resultParamKey".- See Also:
-
-
Constructor Details
-
DateListCreatorProcessor
public DateListCreatorProcessor()Default constructor for this processor.
-
-
Method Details
-
checkInParameterMap
public boolean checkInParameterMap()Checks whether the in-channel contains all required parameters.- Overrides:
checkInParameterMap
in classFWProcessor
- Returns:
- true if not overridden by implementations
-
process
Stores day in the outputCollection
.- Specified by:
process
in classFWProcessor
- Returns:
- ever
true
- Throws:
PipeLineException
-
putFormatedDateCollection
protected void putFormatedDateCollection(LocalDateTime aDate, Collection aDestCol) throws PipeLineException Converts a date given in milli seconds to the output format (given by parameter 'resultElementFormat') and puts it to the collection.- Parameters:
aDate
- MillisaDestCol
-- Throws:
PipeLineException
-