logSession.log(admin, admin.getCaId(), LogConstants.MODULE_RA, new Date(), null, null,
LogConstants.EVENT_ERROR_ENDENTITYPROFILE, msg);
throw new EndEntityProfileExistsException();
}
if (EndEntityProfileData.findByProfileName(entityManager, newprofilename) == null) {
final EndEntityProfileData pdl = EndEntityProfileData.findByProfileName(entityManager, oldprofilename);
if (pdl == null) {
final String msg = INTRES.getLocalizedMessage("ra.errorrenameprofile", oldprofilename, newprofilename);
logSession.log(admin, admin.getCaId(), LogConstants.MODULE_RA, new Date(), null, null,
LogConstants.EVENT_ERROR_ENDENTITYPROFILE, msg);
} else {
pdl.setProfileName(newprofilename);
flushProfileCache();
final String msg = INTRES.getLocalizedMessage("ra.renamedprofile", oldprofilename, newprofilename);
logSession.log(admin, admin.getCaId(), LogConstants.MODULE_RA, new Date(), null, null,
LogConstants.EVENT_INFO_ENDENTITYPROFILE, msg);
}