Package com.unboundid.ldif
Class AggregateLDIFReaderChangeRecordTranslator
java.lang.Object
com.unboundid.ldif.AggregateLDIFReaderChangeRecordTranslator
- All Implemented Interfaces:
LDIFReaderChangeRecordTranslator
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public final class AggregateLDIFReaderChangeRecordTranslator
extends Object
implements LDIFReaderChangeRecordTranslator
This class provides an implementation of an LDIF reader change record
translator that can be used to invoke multiple LDIF reader change record
translators for each record to be processed.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new aggregate LDIF reader change record translator that will invoke all of the provided translators for each record to be processed.AggregateLDIFReaderChangeRecordTranslator(Collection<? extends LDIFReaderChangeRecordTranslator> translators) Creates a new aggregate LDIF reader change record translator that will invoke all of the provided translators for each record to be processed. -
Method Summary
Modifier and TypeMethodDescriptiontranslate(LDIFChangeRecord original, long firstLineNumber) Applies some special transformation or filtering to the original change record.
-
Constructor Details
-
AggregateLDIFReaderChangeRecordTranslator
public AggregateLDIFReaderChangeRecordTranslator(@Nullable LDIFReaderChangeRecordTranslator... translators) Creates a new aggregate LDIF reader change record translator that will invoke all of the provided translators for each record to be processed.- Parameters:
translators- The set of LDIF reader change record translators to be invoked for each record to be processed.
-
AggregateLDIFReaderChangeRecordTranslator
public AggregateLDIFReaderChangeRecordTranslator(@Nullable Collection<? extends LDIFReaderChangeRecordTranslator> translators) Creates a new aggregate LDIF reader change record translator that will invoke all of the provided translators for each record to be processed.- Parameters:
translators- The set of LDIF reader change record translators to be invoked for each record to be processed.
-
-
Method Details
-
translate
@Nullable public LDIFChangeRecord translate(@NotNull LDIFChangeRecord original, long firstLineNumber) throws LDIFException Applies some special transformation or filtering to the original change record.- Specified by:
translatein interfaceLDIFReaderChangeRecordTranslator- Parameters:
original- The original change record that was read and parsed from the input file.firstLineNumber- The first line number of the LDIF change record. This is most useful when throwing anLDIFException.- Returns:
- The LDIF change record that should be returned in the call to
LDIFReader.readChangeRecord(). This can be the original parameter change record, a newly constructed change record, ornullto signal that the provided change record should be skipped. - Throws:
LDIFException- If there is an exception during processing. This exception will be re-thrown to the caller of readChangeRecord.
-