// Get the SchemaName
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 AttributeType {} cannot be removed from the disabled schema {}.",
dn.getName(), schemaName );
return;
}
// Test that the Oid exists
AttributeType attributeType = ( AttributeType ) checkOidExists( entry );
if ( schema.isEnabled() && attributeType.isEnabled() )
{
if ( schemaManager.delete( attributeType ) )
{
LOG.debug( "Removed {} from the schema {}", attributeType, schemaName );
}