boolean adminActionRequired = false;
ArrayList<Message> messages = new ArrayList<Message>();
// Get the existing alert handler if it's already enabled.
AlertHandler existingHandler = alertHandlers.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)
{
DirectoryServer.deregisterAlertHandler(existingHandler);
AlertHandler alertHandler = alertHandlers.remove(configuration.dn());
if (alertHandler != null)
{
alertHandler.finalizeAlertHandler();
}
}
return new ConfigChangeResult(resultCode, adminActionRequired, messages);
}
// Get the class for the alert 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 an alert handler.
String className = configuration.getJavaClass();
if (existingHandler != null)
{
if (! className.equals(existingHandler.getClass().getName()))
{
adminActionRequired = true;
}
return new ConfigChangeResult(resultCode, adminActionRequired, messages);
}
AlertHandler alertHandler = null;
try
{
alertHandler = loadHandler(className, configuration, true);
}
catch (InitializationException ie)