boolean adminActionRequired = false;
ArrayList<Message> messages = new ArrayList<Message>();
// Get the existing extension if it's already enabled.
Extension existingExtension = extensions.get(configuration.dn());
// If the new configuration has the extension disabled, then disable it if
// it is enabled, or do nothing if it's already disabled.
if (! configuration.isEnabled())
{
if (existingExtension != null)
{
DirectoryServer.deregisterExtension(configuration.dn());
Extension extension = extensions.remove(configuration.dn());
if (extension != null)
{
extension.finalizeExtension();
}
}
return new ConfigChangeResult(resultCode, adminActionRequired, messages);
}
// Get the class for the extension. If the extension 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 extension is disabled, then instantiate the class
// and initialize and register it as a extension.
String className = configuration.getJavaClass();
if (existingExtension != null)
{
if (! className.equals(existingExtension.getClass().getName()))
{
adminActionRequired = true;
}
return new ConfigChangeResult(resultCode, adminActionRequired, messages);
}
Extension extension = null;
try
{
extension = loadExtension(className, configuration, true);
}
catch (InitializationException ie)