// Get the Syntax from the given entry ( it has been grabbed from the server earlier)
String schemaName = getSchemaName( entry.getDn() );
// Get the schema
Schema schema = schemaManager.getLoadedSchema( schemaName );
if ( schema.isDisabled() )
{
// The schema is disabled, nothing to do.
LOG.debug( "The Syntax {} cannot be removed from the disabled schema {}.",
dn.getName(), schemaName );
return;
}
// Test that the Oid exists
LdapSyntax syntax = ( LdapSyntax ) checkOidExists( entry );
List<Throwable> errors = new ArrayList<Throwable>();
if ( schema.isEnabled() && syntax.isEnabled() )
{
if ( schemaManager.delete( syntax ) )
{
LOG.debug( "Removed {} from the schema {}", syntax, schemaName );
}