@Override public List<User> getAllUsers() { List<ReconcileUserEntity> uL = userDao.findAllUsers(); if (uL == null) return null; List<User> result = new ArrayList<User>(); for (ReconcileUserEntity uWE : uL) { result.add(new User(uWE)); } return result; }
/* * (non-Javadoc) * * @see * org.openiam.idm.srvc.user.service.UserDataService#getSupervisors(java * .lang.String) */ @Transactional(readOnly = true) public List<Supervisor> getSupervisors(String employeeId) { if (employeeId == null) throw new NullPointerException("employeeId is null"); List<SupervisorEntity> superVisList = supervisorDao.findSupervisors(employeeId); List<Supervisor> supervisorList = new LinkedList<Supervisor>(); for (SupervisorEntity sup : superVisList) { org.hibernate.Hibernate.initialize(sup.getSupervisor().getPhones()); org.hibernate.Hibernate.initialize(sup.getSupervisor().getEmailAddresses()); org.hibernate.Hibernate.initialize(sup.getSupervisor().getAddresses()); org.hibernate.Hibernate.initialize(sup.getSupervisor().getUserAttributes()); supervisorList.add(supervisorDozerConverter.convertToDTO(sup, true)); } return supervisorList; }
@Transactional(readOnly = true) public List<UserAttribute> getUserAsAttributeList( String principalName, List<String> attributeList) { List<UserAttribute> attrList = new ArrayList<UserAttribute>(); User u = getUserByPrincipal( sysConfiguration.getDefaultSecurityDomain(), principalName, sysConfiguration.getDefaultManagedSysId(), false); if (u == null) { return null; } UserAttribute atr = new UserAttribute("EMAIL", u.getEmail()); attrList.add(atr); return attrList; }