return;
}
// Test that the Oid exists
SyntaxChecker syntaxChecker = null;
try
{
syntaxChecker = ( SyntaxChecker ) checkSyntaxCheckerOidExists( entry );
}
catch ( LdapSchemaViolationException lsve )
{
// The syntaxChecker does not exist
syntaxChecker = factory.getSyntaxChecker( schemaManager, entry, schemaManager.getRegistries(), schemaName );
if ( schemaManager.getRegistries().contains( syntaxChecker ) )
{
// Remove the syntaxChecker from the schema/SchemaObject Map
schemaManager.getRegistries().dissociateFromSchema( syntaxChecker );
// Ok, we can exit.
return;
}
else
{
// Ok, definitively an error
String msg = I18n.err( I18n.ERR_387, entry.getDn().getName() );
LOG.info( msg );
throw new LdapSchemaViolationException( msg, ResultCodeEnum.UNWILLING_TO_PERFORM );
}
}
if ( schema.isEnabled() && syntaxChecker.isEnabled() )
{
if ( schemaManager.delete( syntaxChecker ) )
{
LOG.debug( "Deleted {} from the enabled schema {}", dn.getName(), schemaName );
}