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