public void moveAndRename( Dn oriChildName, Dn newParentName, Rdn newRdn, boolean deleteOldRn,
Entry entry, boolean cascade ) throws LdapException
{
checkNewParent( newParentName );
String oldSchemaName = getSchemaName( oriChildName );
ObjectClass oldOc = factory.getObjectClass( schemaManager, entry, schemaManager.getRegistries(), oldSchemaName );
// this class does not handle dependencies
// Set<Entry> dependees = dao.listObjectClassDependents( oldOc );
// if ( dependees != null && dependees.size() > 0 )
// {
// throw new LdapUnwillingToPerformException( "The objectClass with OID " + oldOc.getOid()
// + " cannot be deleted until all entities"
// + " using this objectClass have also been deleted. The following dependees exist: "
// + getOids( dependees ),
// ResultCodeEnum.UNWILLING_TO_PERFORM );
// }
String newSchemaName = getSchemaName( newParentName );
Entry targetEntry = ( Entry ) entry.clone();
String newOid = newRdn.getNormValue().getString();
checkOidIsUnique( newOid );
targetEntry.put( MetaSchemaConstants.M_OID_AT, newOid );
ObjectClass oc = factory.getObjectClass( schemaManager, targetEntry, schemaManager.getRegistries(),
newSchemaName );
if ( isSchemaEnabled( oldSchemaName ) )
{
schemaManager.unregisterObjectClass( oldOc.getOid() );