@Test public void test132ReverseRenameCompositeCompositeOverlappingDeleteOldRdnExistInEntry() throws LdapException { Dn dn = new Dn( "sn=small+cn=test,ou=system" ); Rdn oldRdn = new Rdn( "sn=small+cn=test" ); Rdn newRdn = new Rdn( "sn=big+cn=test" ); Entry entry = new DefaultEntry( dn, "objectClass: top", "objectClass: person", "cn: test", "sn: small", "sn: big", "sn: this is a test" ); List<LdifEntry> reverseds = LdifRevertor.reverseRename( entry, newRdn, LdifRevertor.DELETE_OLD_RDN ); assertNotNull( reverseds ); assertEquals( 1, reverseds.size() ); LdifEntry reversed = reverseds.get( 0 ); assertEquals( "sn=big+cn=test,ou=system", reversed.getDn().getName() ); assertEquals( ChangeType.ModRdn, reversed.getChangeType() ); assertFalse( reversed.isDeleteOldRdn() ); assertEquals( oldRdn.getName(), reversed.getNewRdn() ); assertNull( reversed.getNewSuperior() ); }
public static List<LdifEntry> reverseRename( Entry entry, Rdn newRdn, boolean deleteOldRdn ) throws LdapInvalidDnException { return reverseMoveAndRename( entry, null, newRdn, deleteOldRdn ); }
LdifRevertor { public static List<LdifEntry> reverseRename( Entry entry, Rdn newRdn, boolean deleteOldRdn ) throws LdapInvalidDnException { return reverseMoveAndRename( entry, null, newRdn, deleteOldRdn ); } }
LdifRevertor { public static List<LdifEntry> reverseRename( Entry entry, Rdn newRdn, boolean deleteOldRdn ) throws LdapInvalidDnException { return reverseMoveAndRename( entry, null, newRdn, deleteOldRdn ); } private  LdifRevertor(); }
LdifRevertor { public static List<LdifEntry> reverseRename( Entry entry, Rdn newRdn, boolean deleteOldRdn ) throws LdapInvalidDnException { return reverseMoveAndRename( entry, null, newRdn, deleteOldRdn ); } private  LdifRevertor(); static LdifEntry reverseAdd( Dn dn ); static LdifEntry reverseDel( Dn dn, Entry deletedEntry ); static LdifEntry reverseModify( Dn dn, List<Modification> forwardModifications, Entry modifiedEntry ); static LdifEntry reverseMove( Dn newSuperiorDn, Dn modifiedDn ); static List<LdifEntry> reverseRename( Entry entry, Rdn newRdn, boolean deleteOldRdn ); static List<LdifEntry> reverseMoveAndRename( Entry entry, Dn newSuperior, Rdn newRdn, boolean deleteOldRdn ); }
LdifRevertor { public static List<LdifEntry> reverseRename( Entry entry, Rdn newRdn, boolean deleteOldRdn ) throws LdapInvalidDnException { return reverseMoveAndRename( entry, null, newRdn, deleteOldRdn ); } private  LdifRevertor(); static LdifEntry reverseAdd( Dn dn ); static LdifEntry reverseDel( Dn dn, Entry deletedEntry ); static LdifEntry reverseModify( Dn dn, List<Modification> forwardModifications, Entry modifiedEntry ); static LdifEntry reverseMove( Dn newSuperiorDn, Dn modifiedDn ); static List<LdifEntry> reverseRename( Entry entry, Rdn newRdn, boolean deleteOldRdn ); static List<LdifEntry> reverseMoveAndRename( Entry entry, Dn newSuperior, Rdn newRdn, boolean deleteOldRdn ); static final boolean DELETE_OLD_RDN; static final boolean KEEP_OLD_RDN; }