Class CompositeJobParametersValidator
java.lang.Object
org.springframework.batch.core.job.CompositeJobParametersValidator
- All Implemented Interfaces:
JobParametersValidator
,org.springframework.beans.factory.InitializingBean
public class CompositeJobParametersValidator
extends Object
implements JobParametersValidator, org.springframework.beans.factory.InitializingBean
Composite
JobParametersValidator
that passes the job parameters through a
sequence of injected JobParametersValidator
s- Author:
- Morten Andersen-Gott, Mahmoud Ben Hassine
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
setValidators
(List<JobParametersValidator> validators) Public setter for the validatorsvoid
validate
(JobParameters parameters) Validates the JobParameters according to the injected JobParameterValidators Validation stops and exception is thrown on first validation error
-
Constructor Details
-
CompositeJobParametersValidator
public CompositeJobParametersValidator()
-
-
Method Details
-
validate
Validates the JobParameters according to the injected JobParameterValidators Validation stops and exception is thrown on first validation error- Specified by:
validate
in interfaceJobParametersValidator
- Parameters:
parameters
- someJobParameters
- Throws:
JobParametersInvalidException
- if the parameters are invalid
-
setValidators
Public setter for the validators- Parameters:
validators
- list of validators to be used by the CompositeJobParametersValidator.
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-