public class JobParameterExecutionContextCopyListener extends StepExecutionListenerSupport
JobParameters
to the Step
ExecutionContext
. A list of
keys should be provided that correspond to the items in the Step
ExecutionContext
that should be copied.Constructor and Description |
---|
JobParameterExecutionContextCopyListener() |
Modifier and Type | Method and Description |
---|---|
void |
beforeStep(StepExecution stepExecution)
|
void |
setKeys(String[] keys) |
afterStep
public JobParameterExecutionContextCopyListener()
public void setKeys(String[] keys)
keys
- A list of keys corresponding to items in the
JobParameters
that should be copied.public void beforeStep(StepExecution stepExecution)
JobParameters
to the Step
ExecutionContext
, if not already present. The the key is already
present we assume that a restart is in operation and the previous value
is needed. If the provided keys are empty defaults to copy all keys in
the JobParameters
.beforeStep
in interface StepExecutionListener
beforeStep
in class StepExecutionListenerSupport
Copyright © 2014 Pivotal. All rights reserved.