{
identityMapper.finalizeIdentityMapper();
}
}
return new ConfigChangeResult(resultCode, adminActionRequired, messages);
}
// Get the class for the identity 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 an identity mapper.
String className = configuration.getJavaClass();
if (existingMapper != null)
{
if (! className.equals(existingMapper.getClass().getName()))
{
adminActionRequired = true;
}
return new ConfigChangeResult(resultCode, adminActionRequired, messages);
}
IdentityMapper identityMapper = null;
try
{
identityMapper = loadMapper(className, configuration, true);
}
catch (InitializationException ie)
{
if (resultCode == ResultCode.SUCCESS)
{
resultCode = DirectoryServer.getServerErrorResultCode();
}
messages.add(ie.getMessageObject());
}
if (resultCode == ResultCode.SUCCESS)
{
identityMappers.put(configuration.dn(), identityMapper);
DirectoryServer.registerIdentityMapper(configuration.dn(),
identityMapper);
}
return new ConfigChangeResult(resultCode, adminActionRequired, messages);
}