public class LdifReaderBuilder
extends java.lang.Object
| Constructor and Description |
|---|
LdifReaderBuilder() |
| Modifier and Type | Method and Description |
|---|---|
LdifReader |
build()
Returns a fully constructed
LdifReader. |
LdifReaderBuilder |
currentItemCount(int currentItemCount)
Index for the current item.
|
LdifReaderBuilder |
maxItemCount(int maxItemCount)
Configure the max number of items to be read.
|
LdifReaderBuilder |
name(java.lang.String name)
The name used to calculate the key within the
ExecutionContext. |
LdifReaderBuilder |
recordsToSkip(int recordsToSkip)
Public setter for the number of lines to skip at the start of a file.
|
LdifReaderBuilder |
resource(org.springframework.core.io.Resource resource)
Establishes the resource that will be used as the input for the LdifReader.
|
LdifReaderBuilder |
saveState(boolean saveState)
Configure if the state of the
ItemStreamSupport
should be persisted within the ExecutionContext
for restart purposes. |
LdifReaderBuilder |
skippedRecordsCallback(RecordCallbackHandler skippedRecordsCallback)
RecordCallbackHandler implementations can be used to
take action on skipped records. |
LdifReaderBuilder |
strict(boolean strict)
In strict mode the reader will throw an exception on
AbstractItemCountingItemStreamItemReader.open(org.springframework.batch.item.ExecutionContext) if the
input resource does not exist. |
public LdifReaderBuilder saveState(boolean saveState)
ItemStreamSupport
should be persisted within the ExecutionContext
for restart purposes.saveState - defaults to truepublic LdifReaderBuilder name(java.lang.String name)
ExecutionContext. Required if
saveState(boolean) is set to true.name - name of the reader instanceItemStreamSupport.setName(String)public LdifReaderBuilder maxItemCount(int maxItemCount)
maxItemCount - the max items to be readAbstractItemCountingItemStreamItemReader.setMaxItemCount(int)public LdifReaderBuilder currentItemCount(int currentItemCount)
currentItemCount - current indexAbstractItemCountingItemStreamItemReader.setCurrentItemCount(int)public LdifReaderBuilder strict(boolean strict)
AbstractItemCountingItemStreamItemReader.open(org.springframework.batch.item.ExecutionContext) if the
input resource does not exist.strict - true by defaultLdifReader.setStrict(boolean)public LdifReaderBuilder skippedRecordsCallback(RecordCallbackHandler skippedRecordsCallback)
RecordCallbackHandler implementations can be used to
take action on skipped records.skippedRecordsCallback - will be called for each one of the initial skipped
lines before any items are read.LdifReader.setSkippedRecordsCallback(RecordCallbackHandler)public LdifReaderBuilder recordsToSkip(int recordsToSkip)
recordsToSkip - the number of lines to skipLdifReader.setRecordsToSkip(int)public LdifReaderBuilder resource(org.springframework.core.io.Resource resource)
resource - the resource that will be read.LdifReader.setResource(Resource)public LdifReader build()
LdifReader.LdifReader