Package org.springframework.batch.core.job

# 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

  Constructors
  Constructor
  Description
  `CompositeJobParametersValidator()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `afterPropertiesSet()`
  `void`
  `setValidators(List<JobParametersValidator> validators)`
  Public setter for the validators
  `void`
  `validate(JobParameters parameters)`
  Validates the JobParameters according to the injected JobParameterValidators Validation stops and exception is thrown on first validation error

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

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

- ## Constructor Details

  - ### CompositeJobParametersValidator

    public CompositeJobParametersValidator()

- ## Method Details

  - ### validate

    public void validate(@Nullable JobParameters parameters) throws JobParametersInvalidException
    Validates the JobParameters according to the injected JobParameterValidators Validation stops and exception is thrown on first validation error
    Specified by:
      `validate` in interface `JobParametersValidator`
    Parameters:
      `parameters` - some `JobParameters`
    Throws:
      `JobParametersInvalidException` - if the parameters are invalid

  - ### setValidators

    public void setValidators(List<JobParametersValidator> validators)
    Public setter for the validators
    Parameters:
      `validators` - list of validators to be used by the CompositeJobParametersValidator.

  - ### afterPropertiesSet

    public void afterPropertiesSet() throws Exception
    Specified by:
      `afterPropertiesSet` in interface `org.springframework.beans.factory.InitializingBean`
    Throws:
      `Exception`