Class ExcludeChangeTypeTransformation
java.lang.Object
com.unboundid.ldap.sdk.transformations.ExcludeChangeTypeTransformation
- All Implemented Interfaces:
LDIFChangeRecordTransformation,LDIFReaderChangeRecordTranslator,LDIFWriterChangeRecordTranslator,Serializable
@NotMutable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public final class ExcludeChangeTypeTransformation
extends Object
implements LDIFChangeRecordTransformation, Serializable
This class provides an LDIF change record transformation that can exclude
change records that can exclude LDIF change records that match any of a
provided set of change types. It will not have any effect on LDIF records
that do not contain a change type (which must be entries).
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionExcludeChangeTypeTransformation(ChangeType... changeTypes) Creates a new exclude change type transformation that will exclude change records with any of the provided change types.ExcludeChangeTypeTransformation(Collection<ChangeType> changeTypes) Creates a new exclude change type transformation that will exclude change records with any of the provided change types. -
Method Summary
Modifier and TypeMethodDescriptiontransformChangeRecord(LDIFChangeRecord changeRecord) Applies an appropriate transformation to the provided LDIF change record.translate(LDIFChangeRecord original, long firstLineNumber) Applies some special transformation or filtering to the original change record.translateChangeRecordToWrite(LDIFChangeRecord original) Applies some special transformation or filtering to the original change record.
-
Constructor Details
-
ExcludeChangeTypeTransformation
Creates a new exclude change type transformation that will exclude change records with any of the provided change types.- Parameters:
changeTypes- The set of change types to exclude.
-
ExcludeChangeTypeTransformation
Creates a new exclude change type transformation that will exclude change records with any of the provided change types.- Parameters:
changeTypes- The set of change types to exclude.
-
-
Method Details
-
transformChangeRecord
Applies an appropriate transformation to the provided LDIF change record.- Specified by:
transformChangeRecordin interfaceLDIFChangeRecordTransformation- Parameters:
changeRecord- The LDIF change record to transform.- Returns:
- A copy of the change record with any appropriate transformation
applied, the original change record if no transformations were
necessary, or
nullif the change record should be suppressed.
-
translate
@Nullable public LDIFChangeRecord translate(@NotNull LDIFChangeRecord original, long firstLineNumber) 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.
-
translateChangeRecordToWrite
Applies some special transformation or filtering to the original change record.- Specified by:
translateChangeRecordToWritein interfaceLDIFWriterChangeRecordTranslator- Parameters:
original- The original change record that was to be written.- Returns:
- The change record that should be written. This can be the
original parameter change record, a newly-constructed change
record, or
nullto 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 theduplicate()method to create a copy of the original and make the necessary changes to that duplicate.
-