if ( !schemaManager.isSchemaLoaded( schemaName ) )
{
// The schema is not loaded. We can't create the requested Normalizer
String msg = I18n.err( I18n.ERR_10018, entry.getDn().getName(), schemaName );
LOG.warn( msg );
throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, msg );
}
Schema schema = getSchema( schemaName, targetRegistries );
if ( schema == null )
{
// The schema is disabled. We still have to update the backend
String msg = I18n.err( I18n.ERR_10019, entry.getDn().getName(), schemaName );
LOG.info( msg );
schema = schemaManager.getLoadedSchema( schemaName );
}
// The FQCN
String className = getFqcn( entry, SchemaConstants.NORMALIZER );
// The ByteCode
Attribute byteCode = entry.get( MetaSchemaConstants.M_BYTECODE_AT );
try
{
// Class load the Normalizer
Normalizer normalizer = classLoadNormalizer( schemaManager, oid, className, byteCode );
// Update the common fields
setSchemaObjectProperties( normalizer, entry, schema );
// return the resulting Normalizer
return normalizer;
}
catch ( Exception e )
{
throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, e.getMessage(), e );
}
}