private PasswordEncoder passwordEncoder;
public List<SeteUserVo> loadAllSeteUsers() {
List<SeteUser> users = seteUserDao.getAllSeteUsers();
List<SeteUserVo> userVos = new ArrayList<SeteUserVo>();
SeteUserVo vo = null;
for(SeteUser su : users) {
vo = new SeteUserVo();
vo.setFirstName(su.getFirstName());
vo.setMiddleName(su.getMiddleName());
vo.setLastName(su.getLastName());
vo.setLoginName(su.getLoginName());
if(!su.getDateOfBirth().equals("")){
SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy");
vo.setDateOfBirth(sdf.format(su.getDateOfBirth()));
}
else{
vo.setDateOfBirth("");
}
vo.setAddress(su.getContactInformation().getAddress());
vo.setEmailAddress(su.getContactInformation().getEmailAddress());
vo.setPhoneNumber(su.getContactInformation().getPhoneNumber());
// do user Role
List<UserRolePrivilege> rolePrivs = new ArrayList<UserRolePrivilege> (su.getUserRolePrivileges());
//will need to change to array if user can have more than one Role
String s = "";
for(UserRolePrivilege urp: rolePrivs)
{
//
s = s + " " + urp.getUserRoleType().getLabel();
}
vo.setUserRole(s);
//massage for Privileges
userVos.add(vo);
}