/**
* Try to find the pUsr before persist in Database to avoid Constraints
* Violation Exception
*
* @param pUsr
*/
@Override
@Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT, rollbackForClassName = { "BusinessException" })
public void checkBeforeCreatePaasUser(PaasUser pUsr) {
try {
PaasUser user = findPaasUser(pUsr.getSsoId().getValue());
// Update information
user.setFirstName(pUsr.getFirstName());
user.setLastName(pUsr.getLastName());
user.setMail(pUsr.getMail());
user.setPaasUserRole(pUsr.getPaasUserRole());
user.setSubTenant(pUsr.getSubTenant());
log.debug("PaasUser " + pUsr.getSsoId() + " found ==> No need te recreate one, just update informations about it", pUsr.getFullName());
} catch (ObjectNotFoundException ex) {
createPaasUser(pUsr);
log.debug("No paasUser " + pUsr.getSsoId() + " found ==> Create one ", ex.getCause());
log.debug(findAllPaasUsers().toString());
}
}
ManagePaasUserImpl.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:elpaaso-core
作者:
评论列表
文章目录