/** * Revert a DN to it's previous version by removing the first RDN and adding the given RDN. * It's a rename operation. The biggest issue is that we have many corner cases, depending * on the RDNs we are manipulating, and on the content of the initial entry. * * @param entry The initial Entry * @param newRdn The new RDN * @param deleteOldRdn A flag which tells to delete the old RDN AVAs * @return A list of LDIF reverted entries * @throws NamingException If the name reverting failed */ public static List<LdifEntry> reverseRename( Entry entry, RDN newRdn, boolean deleteOldRdn ) throws LdapInvalidDnException { return reverseMoveAndRename( entry, null, newRdn, deleteOldRdn ); }