Package org.forgerock.opendj.ldif
Interface RejectedLdifListener
-
public interface RejectedLdifListenerA listener interface which is notified whenever LDIF records are skipped, malformed, or fail schema validation.By default the
FAIL_FASTlistener is used.
-
-
Field Summary
Fields Modifier and Type Field Description static RejectedLdifListenerFAIL_FASTThe default handler which ignores skipped records but which terminates processing by throwing aDecodeExceptionas soon as a record is found to be malformed or rejected due to a schema validation failure.static RejectedLdifListenerIGNORE_ALLA handler which ignores all rejected record notifications.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidhandleMalformedRecord(long lineNumber, List<String> lines, DecodeException exception)Invoked when a record was rejected because it was malformed in some way and could not be decoded.voidhandleSchemaValidationFailure(long lineNumber, List<String> lines, List<LocalizableMessage> reasons)Invoked when a record was rejected because it does not conform to the schema and schema validation is enabled.voidhandleSchemaValidationWarning(long lineNumber, List<String> lines, List<LocalizableMessage> reasons)Invoked when a record was not rejected but contained one or more schema validation warnings.voidhandleSkippedRecord(long lineNumber, List<String> lines, LocalizableMessage reason)Invoked when a record was skipped because it did not match filter criteria defined by the reader.
-
-
-
Field Detail
-
FAIL_FAST
static final RejectedLdifListener FAIL_FAST
The default handler which ignores skipped records but which terminates processing by throwing aDecodeExceptionas soon as a record is found to be malformed or rejected due to a schema validation failure.
-
IGNORE_ALL
static final RejectedLdifListener IGNORE_ALL
A handler which ignores all rejected record notifications.
-
-
Method Detail
-
handleMalformedRecord
void handleMalformedRecord(long lineNumber, List<String> lines, DecodeException exception) throws DecodeExceptionInvoked when a record was rejected because it was malformed in some way and could not be decoded.- Parameters:
lineNumber- The line number within the source location in which the malformed record is located, if known, otherwise-1.lines- The content of the malformed record.exception- The original exception for the reason why the record is malformed.- Throws:
DecodeException- If processing should terminate.
-
handleSchemaValidationFailure
void handleSchemaValidationFailure(long lineNumber, List<String> lines, List<LocalizableMessage> reasons) throws DecodeExceptionInvoked when a record was rejected because it does not conform to the schema and schema validation is enabled.- Parameters:
lineNumber- The line number within the source location in which the rejected record is located, if known, otherwise-1.lines- The content of the record which failed schema validation.reasons- The reasons why the record failed schema validation.- Throws:
DecodeException- If processing should terminate.
-
handleSchemaValidationWarning
void handleSchemaValidationWarning(long lineNumber, List<String> lines, List<LocalizableMessage> reasons) throws DecodeExceptionInvoked when a record was not rejected but contained one or more schema validation warnings.- Parameters:
lineNumber- The line number within the source location in which the record is located, if known, otherwise-1.lines- The content of the record which contained schema validation warnings.reasons- The schema validation warnings.- Throws:
DecodeException- If processing should terminate.
-
handleSkippedRecord
void handleSkippedRecord(long lineNumber, List<String> lines, LocalizableMessage reason) throws DecodeExceptionInvoked when a record was skipped because it did not match filter criteria defined by the reader.- Parameters:
lineNumber- The line number within the source location in which the skipped record is located, if known, otherwise-1.lines- The content of the record which was skipped.reason- The reason why the record was skipped.- Throws:
DecodeException- If processing should terminate.
-
-