Class DateListCreatorProcessor

java.lang.Object
net.simplace.pipe.control.FWProcessor
net.simplace.pipe.processors.DateListCreatorProcessor

public class DateListCreatorProcessor extends FWProcessor
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)
    A DateFormat representation the startDate is given in (Default: "YYYY-MM-DD")
  • endDate | dayCount (mandatory) End-Date in the same format as startDate 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 resulting Collection is stored in.
  • resultElementFormat (optional) The format the Collection elements are stored in. Supported values are:
    • java.time.LocalDateTime, so that the result is a Collection<Date>
    • a string representation of DateFormat, so that the result is a Collection<String>
    (Default: same value as startDate)
Version:
1.0
Author:
Martin Schmitz
  • Field Details

    • DAY_IN_MILLIES

      public static final long DAY_IN_MILLIES
      A day represented in milli seconds.
      See Also:
    • INKEY_START_DATE

      public static final String INKEY_START_DATE
      Constant for in-channel parameter key "startDate".
      See Also:
    • INKEY_START_DATE_FORMAT

      public static final String INKEY_START_DATE_FORMAT
      Constant for in-channel parameter key "startDate".
      See Also:
    • INKEY_END_DATE

      public static final String INKEY_END_DATE
      Constant for in-channel parameter key "endDate".
      See Also:
    • INKEY_DAY_COUNT

      public static final String INKEY_DAY_COUNT
      Constant for in-channel parameter key "dayCount".
      See Also:
    • INKEY_STEP_SIZE

      public static final String INKEY_STEP_SIZE
      Constant for in-channel parameter key "stepSize".
      See Also:
    • INKEY_RESULT_FORMAT

      public static final String INKEY_RESULT_FORMAT
      Constant for in-channel parameter key "dayCount".
      See Also:
    • OUTKEY_RESULT_PARAM_KEY

      public static final String 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 class FWProcessor
      Returns:
      true if not overridden by implementations
    • process

      protected boolean process() throws PipeLineException
      Stores day in the output Collection.
      Specified by:
      process in class FWProcessor
      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 - Millis
      aDestCol -
      Throws:
      PipeLineException