Package com.isode.dsapi
Class RenameEntry
- java.lang.Object
-
- com.isode.dsapi.GenericEntry
-
- com.isode.dsapi.ChangeEntry
-
- com.isode.dsapi.RenameEntry
-
- All Implemented Interfaces:
java.lang.Comparable<GenericEntry>
,java.lang.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
-
-
Field Summary
-
Fields inherited from class com.isode.dsapi.GenericEntry
attributeList, DS_Entry, logger
-
-
Constructor Summary
Constructors Constructor Description RenameEntry(DN dn, DN new_dn)
Create a new RenameEntry with the specified details.RenameEntry(DN dn, DN new_dn, boolean delete_old_rdn)
Create a new RenameEntry with the specified details.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getDeleteOldRDN()
Get the 'Delete Old RDN' flagDN
getNewDN()
Get the 'New DN'java.lang.String
toString()
Returns a String representation of this RenameEntry.-
Methods inherited from class com.isode.dsapi.ChangeEntry
addAttribute, append, deleteAttribute, diff, jni_diff, replaceAttribute
-
Methods inherited from class com.isode.dsapi.GenericEntry
compareTo, finalize, getAttributeIterator, getChangeIterator, getDN, hasChanges, iterator, setDN, sortArrayByDN, toLDIF
-
-
-
-
Constructor Detail
-
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:
java.lang.NullPointerException
- if dn or new_dn is nullNativeLibraryException
- 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:
java.lang.NullPointerException
- if dn or new_dn is nullNativeLibraryException
- if an unrecoverable error was detected by the native library
-
-
Method Detail
-
getNewDN
public DN getNewDN()
Get the 'New DN'
-
getDeleteOldRDN
public boolean getDeleteOldRDN()
Get the 'Delete Old RDN' flag
-
toString
public java.lang.String toString()
Returns a String representation of this RenameEntry.- Overrides:
toString
in classChangeEntry
- Returns:
- a String representation of the entry.
-
-