Class ExcludeChangeTypeTransformation

    • Constructor Detail

      • ExcludeChangeTypeTransformation

        public ExcludeChangeTypeTransformation​(@Nullable
                                               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​(@Nullable
                                               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

      • translate

        @Nullable
        public LDIFChangeRecord translate​(@NotNull
                                          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

        @Nullable
        public LDIFChangeRecord translateChangeRecordToWrite​(@NotNull
                                                             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.