|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.api.ldap.model.ldif.LdifRevertor
public final class LdifRevertor
A helper class which provides methods to reverse a LDIF modification operation.
| Field Summary | |
|---|---|
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 |
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final boolean DELETE_OLD_RDN
public static final boolean KEEP_OLD_RDN
| Method Detail |
|---|
public static LdifEntry reverseAdd(Dn dn)
dn - the dn of the added entry
public static LdifEntry reverseDel(Dn dn,
Entry deletedEntry)
throws LdapException
dn - The deleted entry DndeletedEntry - The entry which has been deleted
LdapException - If something went wrong
public 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 modifications
LdapException - If something went wrong
public 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 wrong
public 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 AVAs
LdapInvalidDnException - If the name reverting failed
public 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 AVAs
LdapInvalidDnException - If the name reverting failed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||