org.springframework.batch.core.launch.support

## Class ScheduledJobParametersFactory

- java.lang.Object
- - org.springframework.batch.core.launch.support.ScheduledJobParametersFactory

- All Implemented Interfaces:
    JobParametersConverter

      public class ScheduledJobParametersFactory
      extends java.lang.Object
      implements JobParametersConverter

  Author:
    Lucas Ward

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `SCHEDULE_DATE_KEY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ScheduledJobParametersFactory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `JobParameters` | `getJobParameters(java.util.Properties props)` Get a new `JobParameters` instance.
    `java.util.Properties` | `getProperties(JobParameters params)` Convert schedule date to Date, and assume all other parameters can be represented by their default string value.
    `void` | `setDateFormat(java.text.DateFormat dateFormat)` Public setter for injecting a date format.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### SCHEDULE_DATE_KEY

          public static final java.lang.String SCHEDULE_DATE_KEY

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ScheduledJobParametersFactory

          public ScheduledJobParametersFactory()

  - ### Method Detail

    - #### getJobParameters

          public JobParameters getJobParameters(java.util.Properties props)

      Description copied from interface: `JobParametersConverter`
      Get a new `JobParameters` instance. If given null, or an empty properties, an empty JobParameters will be returned.
      Specified by:
        `getJobParameters` in interface `JobParametersConverter`
      Parameters:
        `props` - the runtime parameters in the form of String literals.
      Returns:
        a `JobParameters` properties converted to the correct types.

    - #### getProperties

          public java.util.Properties getProperties(JobParameters params)

      Convert schedule date to Date, and assume all other parameters can be represented by their default string value.
      Specified by:
        `getProperties` in interface `JobParametersConverter`
      Returns:
        a representation of the parameters as properties
      See Also:
        `JobParametersConverter.getProperties(org.springframework.batch.core.JobParameters)`

    - #### setDateFormat

          public void setDateFormat(java.text.DateFormat dateFormat)

      Public setter for injecting a date format.
      Parameters:
        `dateFormat` - a `DateFormat`, defaults to "yyyy/MM/dd"