|
|||||||||
| 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(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,
java.util.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 java.util.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 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(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
public static LdifEntry reverseModify(DN dn,
java.util.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
NamingException - If something went wrong
LdapException
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)
NamingException - if something went wrong
LdapException
public static java.util.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
NamingException - If the name reverting failed
LdapInvalidDnException
public static java.util.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
NamingException - If the name reverting failed
LdapInvalidDnException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||