|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.shared.ldap.ldif.LdifRevertor
public class LdifRevertor
A helper class which provides methods to reverse a LDIF modification operation.
| Field Summary | |
|---|---|
static boolean |
DELETE_OLD_RDN
Two constants for the deleteOldRdn flag |
static boolean |
KEEP_OLD_RDN
|
| Constructor Summary | |
|---|---|
LdifRevertor()
|
|
| Method Summary | |
|---|---|
static LdifEntry |
reverseAdd(LdapDN dn)
Compute a reverse LDIF of an AddRequest. |
static LdifEntry |
reverseDel(LdapDN dn,
Entry deletedEntry)
Compute a reverse LDIF of a DeleteRequest. |
static LdifEntry |
reverseModify(LdapDN dn,
java.util.List<Modification> forwardModifications,
Entry modifiedEntry)
Compute the reversed LDIF for a modify request. |
static LdifEntry |
reverseMove(LdapDN newSuperiorDn,
LdapDN modifiedDn)
Compute a reverse LDIF for a forward change which if in LDIF format would represent a Move operation. |
static java.util.List<LdifEntry> |
reverseMoveAndRename(Entry entry,
LdapDN newSuperior,
Rdn newRdn,
boolean deleteOldRdn)
Revert a DN to it's previous version by removing the first RDN and adding the given RDN. |
static java.util.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
| Constructor Detail |
|---|
public LdifRevertor()
| Method Detail |
|---|
public static LdifEntry reverseAdd(LdapDN dn)
dn - the dn of the added entry
public static LdifEntry reverseDel(LdapDN dn,
Entry deletedEntry)
throws javax.naming.NamingException
dn - The deleted entry DNdeletedEntry - The entry which has been deleted
javax.naming.NamingException
public static LdifEntry reverseModify(LdapDN dn,
java.util.List<Modification> forwardModifications,
Entry modifiedEntry)
throws javax.naming.NamingException
dn - the dn of the modified entryforwardModifications - the modification items for the forward changemodifiedEntry - The modified entry. Necessary for the destructive modifications
javax.naming.NamingException - If something went wrong
public static LdifEntry reverseMove(LdapDN newSuperiorDn,
LdapDN modifiedDn)
throws javax.naming.NamingException
newSuperiorDn - the new parent dn to be (must not be null)modifiedDn - the dn of the entry being moved (must not be null)
javax.naming.NamingException - if something went wrong
public static java.util.List<LdifEntry> reverseRename(Entry entry,
Rdn newRdn,
boolean deleteOldRdn)
throws javax.naming.NamingException
entry - The initial EntrynewRdn - The new RDNdeleteOldRdn - A flag which tells to delete the old RDN AVAs
javax.naming.NamingException - If the name reverting failed
public static java.util.List<LdifEntry> reverseMoveAndRename(Entry entry,
LdapDN newSuperior,
Rdn newRdn,
boolean deleteOldRdn)
throws javax.naming.NamingException
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
javax.naming.NamingException - If the name reverting failed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||