public final class LdifRevertor extends Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DELETE_OLD_RDN
Flag used when we want to delete the old Rdn
|
static boolean |
KEEP_OLD_RDN
Flag used when we want to keep the old Rdn
|
| Modifier and Type | Method and Description |
|---|---|
static LdifEntry |
reverseAdd(Dn dn)
Compute a reverse LDIF of an AddRequest.
|
static LdifEntry |
reverseDel(Dn dn,
Entry deletedEntry)
Compute a reverse LDIF of a DeleteRequest.
|
static LdifEntry |
reverseModify(Dn dn,
List<Modification> forwardModifications,
Entry modifiedEntry)
Compute the reversed LDIF for a modify request.
|
static LdifEntry |
reverseMove(Dn newSuperiorDn,
Dn modifiedDn)
Compute a reverse LDIF for a forward change which if in LDIF format
would represent a Move operation.
|
static List<LdifEntry> |
reverseMoveAndRename(Entry entry,
Dn newSuperior,
Rdn newRdn,
boolean deleteOldRdn)
Revert a Dn to it's previous version by removing the first Rdn and adding the given Rdn.
|
static List<LdifEntry> |
reverseRename(Entry entry,
Rdn newRdn,
boolean deleteOldRdn)
Revert a Dn to it's previous version by removing the first Rdn and adding the given Rdn.
|
public static final boolean DELETE_OLD_RDN
public static final boolean KEEP_OLD_RDN
public static LdifEntry reverseAdd(Dn dn)
dn - the dn of the added entrypublic static LdifEntry reverseDel(Dn dn, Entry deletedEntry) throws LdapException
dn - The deleted entry DndeletedEntry - The entry which has been deletedLdapException - If something went wrongpublic static LdifEntry reverseModify(Dn dn, List<Modification> forwardModifications, Entry modifiedEntry) throws LdapException
dn - the dn of the modified entryforwardModifications - the modification items for the forward changemodifiedEntry - The modified entry. Necessary for the destructive modificationsLdapException - If something went wrongpublic static LdifEntry reverseMove(Dn newSuperiorDn, Dn modifiedDn) throws LdapException
newSuperiorDn - the new parent dn to be (must not be null)modifiedDn - the dn of the entry being moved (must not be null)LdapException - if something went wrongpublic static List<LdifEntry> reverseRename(Entry entry, Rdn newRdn, boolean deleteOldRdn) throws LdapInvalidDnException
entry - The initial EntrynewRdn - The new RdndeleteOldRdn - A flag which tells to delete the old Rdn AVAsLdapInvalidDnException - If the name reverting failedpublic static List<LdifEntry> reverseMoveAndRename(Entry entry, Dn newSuperior, Rdn newRdn, boolean deleteOldRdn) throws LdapInvalidDnException
entry - The initial EntrynewSuperior - The new superior Dn (can be null if it's just a rename)newRdn - The new RdndeleteOldRdn - A flag which tells to delete the old Rdn AVAsLdapInvalidDnException - If the name reverting failedCopyright © 2003–2016 The Apache Software Foundation. All rights reserved.