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