Class RenameEntry

All Implemented Interfaces:
Comparable<GenericEntry>, Iterable<Attribute>

public class RenameEntry extends ChangeEntry
A RenameEntry is used to represent a modify-DN or modify-RDN change to the directory. It can be constructed, or loaded from an LDIF file. Once constructed, it can be applied to the directory, or saved to an LDIF file.
Author:
jp
  • Constructor Details

    • RenameEntry

      public RenameEntry(DN dn, DN new_dn)
      Create a new RenameEntry with the specified details. This covers both RDN-rename and changes to superior. The 'delete-old-RDN' flag is set to true.
      Parameters:
      dn - the old distinguished name (must not be null)
      new_dn - the new distinguished name (must not be null)
      Throws:
      NullPointerException - if dn or new_dn is null
      NativeLibraryException - if an unrecoverable error was detected by the native library
    • RenameEntry

      public RenameEntry(DN dn, DN new_dn, boolean delete_old_rdn)
      Create a new RenameEntry with the specified details. This covers the operations for both RDN-rename and changes to superior-DN.
      Parameters:
      dn - the old distinguished name (must not be null)
      new_dn - the new distinguished name (must not be null)
      delete_old_rdn - Delete the old RDN value (true), or leave it in the directory as a non-distinguished value (false)
      Throws:
      NullPointerException - if dn or new_dn is null
      NativeLibraryException - if an unrecoverable error was detected by the native library
  • Method Details

    • getNewDN

      public DN getNewDN()
      Get the 'New DN'
    • getDeleteOldRDN

      public boolean getDeleteOldRDN()
      Get the 'Delete Old RDN' flag
    • toString

      public String toString()
      Returns a String representation of this RenameEntry.
      Overrides:
      toString in class ChangeEntry
      Returns:
      a String representation of the entry.