public class LdifRevertor extends Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DELETE_OLD_RDN
Two constants for the deleteOldRdn flag
|
static boolean |
KEEP_OLD_RDN |
| Constructor and Description |
|---|
LdifRevertor() |
| 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 deletedLdapExceptionpublic 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 modificationsNamingException - If something went wrongLdapExceptionpublic 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)NamingException - if something went wrongLdapExceptionpublic 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 AVAsNamingException - If the name reverting failedLdapInvalidDnExceptionpublic 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 AVAsNamingException - If the name reverting failedLdapInvalidDnExceptionCopyright © 2003–2016 The Apache Software Foundation. All rights reserved.