Package org.springframework.batch.item.validator

# Class BeanValidatingItemProcessor<T>

java.lang.Object
org.springframework.batch.item.validator.ValidatingItemProcessor<T>
org.springframework.batch.item.validator.BeanValidatingItemProcessor<T>

Type Parameters:
  `T` - type of items to validate

All Implemented Interfaces:
  `ItemProcessor<T,T>`, `org.springframework.beans.factory.InitializingBean`

public class BeanValidatingItemProcessor<T> extends ValidatingItemProcessor<T>
A `ValidatingItemProcessor` that uses the Bean Validation API (JSR-303) to validate items.

Since:
  4.1
Author:
  Mahmoud Ben Hassine

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BeanValidatingItemProcessor()`
  Create a new instance of `BeanValidatingItemProcessor` with the default configuration.
  `BeanValidatingItemProcessor(org.springframework.validation.beanvalidation.LocalValidatorFactoryBean localValidatorFactoryBean)`
  Create a new instance of `BeanValidatingItemProcessor`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `afterPropertiesSet()`

  ### Methods inherited from class org.springframework.batch.item.validator.ValidatingItemProcessor

  `process, setFilter, setValidator`

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

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

- ## Constructor Details

  - ### BeanValidatingItemProcessor

    public BeanValidatingItemProcessor()
    Create a new instance of `BeanValidatingItemProcessor` with the default configuration.

  - ### BeanValidatingItemProcessor

    public BeanValidatingItemProcessor(org.springframework.validation.beanvalidation.LocalValidatorFactoryBean localValidatorFactoryBean)
    Create a new instance of `BeanValidatingItemProcessor`.
    Parameters:
      `localValidatorFactoryBean` - used to configure the Bean Validation validator

- ## Method Details

  - ### afterPropertiesSet

    public void afterPropertiesSet() throws Exception
    Specified by:
      `afterPropertiesSet` in interface `org.springframework.beans.factory.InitializingBean`
    Overrides:
      `afterPropertiesSet` in class `ValidatingItemProcessor<T>`
    Throws:
      `Exception`