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