public Long updateLdapConfig(Long ldapConfigId, String name, Boolean addDomainToUserName,
String configFileName, String domain, Long updatedby, Boolean isActive) {
try {
LdapConfig ldapConfig = this.getLdapConfigById(ldapConfigId);
if (ldapConfig == null) {
return -1L;
}
ldapConfig.setAddDomainToUserName(addDomainToUserName);
ldapConfig.setConfigFileName(configFileName);
ldapConfig.setDeleted("false");
ldapConfig.setDomain(domain);
ldapConfig.setIsActive(isActive);
ldapConfig.setName(name);
ldapConfig.setUpdated(new Date());
if (updatedby != null) {
log.debug("updateLdapConfig :1: "+usersDao.getUser(updatedby));
ldapConfig.setUpdatedby(usersDao.getUser(updatedby));
}
log.debug("updateLdapConfig :2: "+updatedby);
ldapConfig = em.merge(ldapConfig);
ldapConfigId = ldapConfig.getLdapConfigId();
return ldapConfigId;
} catch (Exception ex2) {
log.error("[updateLdapConfig]: ",ex2);