boolean adminActionRequired = false;
ArrayList<Message> messages = new ArrayList<Message>();
// Get the existing handler if it's already enabled.
SASLMechanismHandler existingHandler = handlers.get(configuration.dn());
// If the new configuration has the handler disabled, then disable it if it
// is enabled, or do nothing if it's already disabled.
if (! configuration.isEnabled())
{
if (existingHandler != null)
{
SASLMechanismHandler handler = handlers.remove(configuration.dn());
if (handler != null)
{
handler.finalizeSASLMechanismHandler();
}
}
return new ConfigChangeResult(resultCode, adminActionRequired, messages);
}
// Get the class for the SASL handler. If the handler is already enabled,
// then we shouldn't do anything with it although if the class has changed
// then we'll at least need to indicate that administrative action is
// required. If the handler is disabled, then instantiate the class and
// initialize and register it as a SASL mechanism handler.
String className = configuration.getJavaClass();
if (existingHandler != null)
{
if (! className.equals(existingHandler.getClass().getName()))
{
adminActionRequired = true;
}
return new ConfigChangeResult(resultCode, adminActionRequired, messages);
}
SASLMechanismHandler handler = null;
try
{
handler = loadHandler(className, configuration, true);
}
catch (InitializationException ie)