public void enableSchema( String schemaName ) throws Exception
{
DN dn = new DN( "cn=" + schemaName + ",ou=schema" );
dn.normalize( schemaManager.getNormalizerMapping() );
ServerEntry entry = partition.lookup( new LookupOperationContext( null, dn ) );
EntryAttribute disabledAttr = entry.get( disabledAttributeType );
List<Modification> mods = new ArrayList<Modification>( 3 );
if ( disabledAttr == null )
{
LOG.warn( "Does not make sense: you're trying to enable {} schema which is already enabled", schemaName );
return;
}
boolean isDisabled = disabledAttr.contains( "TRUE" );
if ( !isDisabled )
{
LOG.warn( "Does not make sense: you're trying to enable {} schema which is already enabled", schemaName );
return;