// Check that the dependencies, if any, are correct
if ( schema.getDependencies() != null )
{
for ( String dependency : schema.getDependencies() )
{
Schema dependencySchema = schemaLoader.getSchema( dependency );
if ( dependencySchema == null )
{
// The dependency has not been loaded.
String msg = I18n.err( I18n.ERR_11002, schema.getSchemaName() );
LOG.info( msg );
Throwable error = new LdapProtocolErrorException( msg );
errors.add( error );
return false;
}
// If the dependency is disabled, then enable it
if ( dependencySchema.isDisabled() )
{
dependencySchema.enable();
if ( load( registries, dependencySchema ) == false )
{
dependencySchema.disable();
return false;
}
}
}