C# Class Summer.Batch.Core.Step.Job.DefaultJobParametersExtractor

Simple implementation of IJobParametersExtractor which pulls parameters with named keys out of the step execution context and the job parameters of the surrounding job.
Inheritance: IJobParametersExtractor
Show file Open project: SummerBatch/SummerBatch

Public Methods

Method Description
GetJobParameters ( IJob job, StepExecution stepExecution ) : JobParameters

@see IJobParametersExtractor#GetJobParameters(Job, StepExecution).

SetKeys ( string keys ) : void

The key names to pull out of the execution context or job parameters, if they exist. If a key doesn't exist in the execution context then the job parameters from the enclosing job execution are tried, and if there is nothing there either then no parameter is extracted. Key names ending with (long), (int), (double), (date) or (string) will be assumed to refer to values of the respective type and assigned to job parameters accordingly (there will be an error if they are not of the right type). Without a special suffix in that form a parameter is assumed to be of type String.

Private Methods

Method Description
DefaultHandle ( ExecutionContext executionContext, string key, JobParametersBuilder builder, JobParameter>.IDictionary jobParameters ) : void
HandleDateKey ( string key, ExecutionContext executionContext, JobParametersBuilder builder, JobParameter>.IDictionary jobParameters ) : void
HandleDoubleKey ( string key, ExecutionContext executionContext, JobParametersBuilder builder, JobParameter>.IDictionary jobParameters ) : void
HandleLongOrIntKey ( string key, ExecutionContext executionContext, JobParametersBuilder builder, JobParameter>.IDictionary jobParameters ) : void
HandleStringKey ( string key, ExecutionContext executionContext, JobParametersBuilder builder, JobParameter>.IDictionary jobParameters ) : void

Method Details

GetJobParameters() public method

@see IJobParametersExtractor#GetJobParameters(Job, StepExecution).
public GetJobParameters ( IJob job, StepExecution stepExecution ) : JobParameters
job IJob
stepExecution StepExecution
return JobParameters

SetKeys() public method

The key names to pull out of the execution context or job parameters, if they exist. If a key doesn't exist in the execution context then the job parameters from the enclosing job execution are tried, and if there is nothing there either then no parameter is extracted. Key names ending with (long), (int), (double), (date) or (string) will be assumed to refer to values of the respective type and assigned to job parameters accordingly (there will be an error if they are not of the right type). Without a special suffix in that form a parameter is assumed to be of type String.
public SetKeys ( string keys ) : void
keys string
return void