@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class ExcludeChangeTypeTransformation extends java.lang.Object implements LDIFChangeRecordTransformation, java.io.Serializable
Constructor and Description |
---|
ExcludeChangeTypeTransformation(ChangeType... changeTypes)
Creates a new exclude change type transformation that will exclude change
records with any of the provided change types.
|
ExcludeChangeTypeTransformation(java.util.Collection<ChangeType> changeTypes)
Creates a new exclude change type transformation that will exclude change
records with any of the provided change types.
|
Modifier and Type | Method and Description |
---|---|
LDIFChangeRecord |
transformChangeRecord(LDIFChangeRecord changeRecord)
Applies an appropriate transformation to the provided LDIF change record.
|
LDIFChangeRecord |
translate(LDIFChangeRecord original,
long firstLineNumber)
Applies some special transformation or filtering to the original change
record.
|
LDIFChangeRecord |
translateChangeRecordToWrite(LDIFChangeRecord original)
Applies some special transformation or filtering to the original change
record.
|
public ExcludeChangeTypeTransformation(@Nullable ChangeType... changeTypes)
changeTypes
- The set of change types to exclude.public ExcludeChangeTypeTransformation(@Nullable java.util.Collection<ChangeType> changeTypes)
changeTypes
- The set of change types to exclude.@Nullable public LDIFChangeRecord transformChangeRecord(@NotNull LDIFChangeRecord changeRecord)
transformChangeRecord
in interface LDIFChangeRecordTransformation
changeRecord
- The LDIF change record to transform.null
if the change record should be
suppressed.@Nullable public LDIFChangeRecord translate(@NotNull LDIFChangeRecord original, long firstLineNumber)
translate
in interface LDIFReaderChangeRecordTranslator
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 an
LDIFException
.LDIFReader.readChangeRecord()
. This can be the original
parameter change record, a newly constructed change record, or
null
to signal that the provided change record should be
skipped.@Nullable public LDIFChangeRecord translateChangeRecordToWrite(@NotNull LDIFChangeRecord original)
translateChangeRecordToWrite
in interface LDIFWriterChangeRecordTranslator
original
- The original change record that was to be written.null
to signal that the change record should
not be written. Note, however, that if the original record
provided as a parameter is altered, then the change will be
visible to anything that references that change record. If you
are not sure about whether changes to the original change record
are acceptable, it is recommended that you use the
duplicate()
method to create a copy of the original and
make the necessary changes to that duplicate.