org.springframework.batch.core.launch.support
Class ScheduledJobParametersFactory

java.lang.Object
  extended by org.springframework.batch.core.launch.support.ScheduledJobParametersFactory
All Implemented Interfaces:
JobParametersConverter

public class ScheduledJobParametersFactory
extends Object
implements JobParametersConverter

Author:
Lucas Ward

Field Summary
static String SCHEDULE_DATE_KEY
           
 
Constructor Summary
ScheduledJobParametersFactory()
           
 
Method Summary
 JobParameters getJobParameters(Properties props)
          Get a new JobParameters instance.
 Properties getProperties(JobParameters params)
          Convert schedule date to Date, and assume all other parameters can be represented by their default string value.
 void setDateFormat(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 String SCHEDULE_DATE_KEY
See Also:
Constant Field Values
Constructor Detail

ScheduledJobParametersFactory

public ScheduledJobParametersFactory()
Method Detail

getJobParameters

public JobParameters getJobParameters(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 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(DateFormat dateFormat)
Public setter for injecting a date format.

Parameters:
dateFormat - a DateFormat, defaults to "yyyy/MM/dd"


Copyright © 2013 SpringSource. All Rights Reserved.