if ( !schemaManager.isSchemaLoaded( schemaName ) )
{
// The schema is not loaded. We can't create the requested Normalizer
String msg = I18n.err( I18n.ERR_10013, 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_10014, entry.getDn().getName(), schemaName );
LOG.info( msg );
schema = schemaManager.getLoadedSchema( schemaName );
}
// The FQCN
String className = getFqcn( entry, SchemaConstants.SYNTAX_CHECKER );
// The ByteCode
EntryAttribute byteCode = entry.get( MetaSchemaConstants.M_BYTECODE_AT );
try
{
// Class load the syntaxChecker
SyntaxChecker syntaxChecker = classLoadSyntaxChecker( schemaManager, oid, className, byteCode );
// Update the common fields
setSchemaObjectProperties( syntaxChecker, entry, schema );
// return the resulting syntaxChecker
return syntaxChecker;
}
catch ( Exception e )
{
throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, e.getMessage() );
}
}