Class ExcludeChangeTypeTransformation
- java.lang.Object
-
- com.unboundid.ldap.sdk.transformations.ExcludeChangeTypeTransformation
-
- All Implemented Interfaces:
LDIFChangeRecordTransformation
,LDIFReaderChangeRecordTranslator
,LDIFWriterChangeRecordTranslator
,java.io.Serializable
@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class ExcludeChangeTypeTransformation extends java.lang.Object implements LDIFChangeRecordTransformation, java.io.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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Constructor Detail
-
ExcludeChangeTypeTransformation
public ExcludeChangeTypeTransformation(ChangeType... changeTypes)
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
public 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.- Parameters:
changeTypes
- The set of change types to exclude.
-
-
Method Detail
-
transformChangeRecord
public LDIFChangeRecord transformChangeRecord(LDIFChangeRecord changeRecord)
Applies an appropriate transformation to the provided LDIF change record.- Specified by:
transformChangeRecord
in 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
null
if the change record should be suppressed.
-
translate
public LDIFChangeRecord translate(LDIFChangeRecord original, long firstLineNumber)
Applies some special transformation or filtering to the original change record.- Specified by:
translate
in 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, ornull
to signal that the provided change record should be skipped.
-
translateChangeRecordToWrite
public LDIFChangeRecord translateChangeRecordToWrite(LDIFChangeRecord original)
Applies some special transformation or filtering to the original change record.- Specified by:
translateChangeRecordToWrite
in 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
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 theduplicate()
method to create a copy of the original and make the necessary changes to that duplicate.
-
-