+ " cannot have it's OID changed until all "
+ "syntaxes using that syntaxChecker have been deleted.",
ResultCodeEnum.UNWILLING_TO_PERFORM );
}
Schema oldSchema = getSchema( oriChildName );
Schema newSchema = getSchema( newParentName );
ServerEntry targetEntry = ( ServerEntry ) entry.clone();
String newOid = ( String ) newRdn.getValue();
if ( super.targetRegistries.getSyntaxCheckerRegistry().hasSyntaxChecker( newOid ) )
{
throw new LdapNamingException( "Oid " + newOid + " for new schema syntaxChecker is not unique.",
ResultCodeEnum.OTHER );
}
targetEntry.put( MetaSchemaConstants.M_OID_AT, newOid );
SyntaxChecker syntaxChecker = factory.getSyntaxChecker( targetEntry, targetRegistries );
if ( ! oldSchema.isDisabled() )
{
syntaxCheckerRegistry.unregister( oldOid );
}
if ( ! newSchema.isDisabled() )
{
SyntaxCheckerDescription syntaxCheckerDescription =
getSyntaxCheckerDescription( newSchema.getSchemaName(), entry );
syntaxCheckerDescription.setNumericOid( newOid );
syntaxCheckerRegistry.register( syntaxCheckerDescription, syntaxChecker );
}
}