Class MappingLdifReader<T>

All Implemented Interfaces:
ResourceAwareItemReaderItemStream<T>, ItemReader<T>, ItemStream, ItemStreamReader<T>, org.springframework.beans.factory.InitializingBean

public class MappingLdifReader<T> extends AbstractItemCountingItemStreamItemReader<T> implements ResourceAwareItemReaderItemStream<T>, org.springframework.beans.factory.InitializingBean
The MappingLdifReader is an adaptation of the FlatFileItemReader built around an LdifParser. It differs from the standard LdifReader in its ability to map LdapAttributes objects to POJOs.

The MappingLdifReader requires an RecordMapper implementation. If mapping is not required, the LdifReader should be used instead. It simply returns an LdapAttributes object which can be consumed and manipulated as necessary by ItemProcessor or any output service.

As with the FlatFileItemReader, the strict option differentiates between whether or not to require the resource to exist before processing. In the case of a value set to false, a warning is logged instead of an exception being thrown.

This reader is not thread-safe.

Keith Barlow, Mahmoud Ben Hassine