Class ExcludeAllEntriesTransformation
java.lang.Object
com.unboundid.ldap.sdk.transformations.ExcludeAllEntriesTransformation
- All Implemented Interfaces:
EntryTransformation,LDIFReaderEntryTranslator,LDIFWriterEntryTranslator,Serializable
@NotMutable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public final class ExcludeAllEntriesTransformation
extends Object
implements EntryTransformation, Serializable
This class provides an entry transformation that will simply suppress all
entries. It can be useful when processing a series of LDIF records if you
only want to preserve change records and suppress all entries.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of this transformation. -
Method Summary
Modifier and TypeMethodDescriptiontransformEntry(Entry entry) Applies an appropriate transformation to the provided entry.Applies some special transformation or filtering to the original Entry.translateEntryToWrite(Entry original) Applies some special transformation or filtering to the original Entry.
-
Constructor Details
-
ExcludeAllEntriesTransformation
public ExcludeAllEntriesTransformation()Creates a new instance of this transformation.
-
-
Method Details
-
transformEntry
Applies an appropriate transformation to the provided entry.- Specified by:
transformEntryin interfaceEntryTransformation- Parameters:
entry- The entry to transform.- Returns:
- A copy of the entry with any appropriate transformation applied,
the original entry if no transformations were necessary, or
nullif the entry should be suppressed.
-
translate
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.
-
translateEntryToWrite
Applies some special transformation or filtering to the original Entry.- Specified by:
translateEntryToWritein interfaceLDIFWriterEntryTranslator- Parameters:
original- The original Entry that was to be written.- Returns:
- The Entry that should be written. This can be the original
parameter Entry, a newly-constructed Entry, or
nullto signal that this Entry should not be written. Note, however, that if the original entry provided as a parameter is altered, then the change will be visible to anything that references that entry. If you are not sure about whether changes to the original entry are acceptable, it is recommended that you use theduplicate()method to create a copy of the original and make the necessary changes to that duplicate.
-