Class ExcludeChangeTypeTransformation

    • 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 interface LDIFChangeRecordTransformation
        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 interface LDIFReaderChangeRecordTranslator
        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 an LDIFException.
        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, or null 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 interface LDIFWriterChangeRecordTranslator
        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 the duplicate() method to create a copy of the original and make the necessary changes to that duplicate.