Examples of SeteUserVo


Examples of org.sete.vo.admin.SeteUserVo

      HttpServletResponse response) throws Exception {

    doCheckAuthorization(request);
    CreateSeteUserProfileForm csupf = (CreateSeteUserProfileForm) form;
    SeteUserProfileService service = getService(SeteUserProfileService.class);
    SeteUserVo seteUser = service.loadSeteUser(getAuthenticatedUser(request).getUserId().toString());
    csupf.setEmailAddress(seteUser.getEmailAddress());
    csupf.setAddress(seteUser.getAddress());
    csupf.setPhoneNumber(seteUser.getPhoneNumber());
     
    return mapping.findForward("view");
  }
View Full Code Here

Examples of org.sete.vo.admin.SeteUserVo

    aSeteUser.setContactInformation(ci);
    aSeteUser.setLoginName("nm");
   
    EasyMock.expect(mockUserDao.findById(Integer.valueOf("1"))).andReturn(aSeteUser);
    EasyMock.replay(mockUserDao);
    SeteUserVo suvo = sups.loadSeteUser("1");
   
    assertEquals(suvo.getAddress(), "test address");
    assertEquals(suvo.getEmailAddress(), "nm@xyz.edu");
    assertEquals(suvo.getPhoneNumber(), "908-720-7643");
   
  }
View Full Code Here

Examples of org.sete.vo.admin.SeteUserVo

      return makeUserVos(users);
    }
   
  private List<SeteUserVo> makeUserVos(List<SeteUser> users) {
    List<SeteUserVo> userVos = new ArrayList<SeteUserVo>();
      SeteUserVo vo = null;
      for(SeteUser su : users) {
        vo = this.makeUserVo(su);
        vo.setUserRoles(extractUserRoles(new ArrayList<UserRolePrivilege> (su.getUserRolePrivileges()), true));
        userVos.add(vo);
      }
    return userVos;
  }
View Full Code Here

Examples of org.sete.vo.admin.SeteUserVo

        SeteUser su = userDao.findById(Integer.valueOf(creator));
        return this.makeUserVo(su);
    }
   
    private SeteUserVo makeUserVo(SeteUser su){
      SeteUserVo vo = new SeteUserVo();
        vo.setUserId(su.getIdAsString());
        vo.setFirstName(su.getFirstName());
        vo.setMiddleName(su.getMiddleName());
        vo.setLastName(su.getLastName());
        vo.setLoginName(su.getLoginName());
   
        if(su.getDateOfBirth() != null && !su.getDateOfBirth().equals("")){
      SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy");
      vo.setDateOfBirth(sdf.format(su.getDateOfBirth()));
    }
    else{
      vo.setDateOfBirth("");
    }

        if(su.getContactInformation() != null){
          vo.setAddress(su.getContactInformation().getAddress());
          vo.setEmailAddress(su.getContactInformation().getEmailAddress());
          vo.setPhoneNumber(su.getContactInformation().getPhoneNumber());
        }
    
      return vo;
    }
View Full Code Here

Examples of org.sete.vo.admin.SeteUserVo

      return vo;
    }
   
    public SeteUserVo getSeteUser(String userId, boolean forDisplay) {
        SeteUser su = userDao.findById(Integer.valueOf(userId));
        SeteUserVo vo = new SeteUserVo();
        if(su != null){
          vo = this.makeUserVo(su);
          vo.setUserRoles(this.extractUserRoles(new ArrayList<UserRolePrivilege> (su.getUserRolePrivileges()), forDisplay));
        } else {
          final String msg = "Invalid SeteUser [id=" + userId + "] " +
      "submitted for update, operation aborted.";

      if(log.isErrorEnabled()) {
View Full Code Here

Examples of org.sete.vo.admin.SeteUserVo

    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);
        }
View Full Code Here

Examples of org.sete.vo.admin.SeteUserVo

      return makeUserVos(users);
    }
   
  private List<SeteUserVo> makeUserVos(List<SeteUser> users) {
    List<SeteUserVo> userVos = new ArrayList<SeteUserVo>();
      SeteUserVo vo = null;
      for(SeteUser su : users) {
        vo = this.makeUserVo(su);
        vo.setUserRoles(extractUserRoles(new ArrayList<UserRolePrivilege> (su.getUserRolePrivileges()), true));
        userVos.add(vo);
      }
    return userVos;
  }
View Full Code Here

Examples of org.sete.vo.admin.SeteUserVo

        SeteUser su = userDao.findById(Integer.valueOf(creator));
        return this.makeUserVo(su);
    }
   
    private SeteUserVo makeUserVo(SeteUser su){
      SeteUserVo vo = new SeteUserVo();
        vo.setUserId(su.getIdAsString());
        vo.setFirstName(su.getFirstName());
        vo.setMiddleName(su.getMiddleName());
        vo.setLastName(su.getLastName());
        vo.setLoginName(su.getLoginName());
   
        if(su.getDateOfBirth() != null && !su.getDateOfBirth().equals("")){
      SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy");
      vo.setDateOfBirth(sdf.format(su.getDateOfBirth()));
    }
    else{
      vo.setDateOfBirth("");
    }

        if(su.getContactInformation() != null){
          vo.setAddress(su.getContactInformation().getAddress());
          vo.setEmailAddress(su.getContactInformation().getEmailAddress());
          vo.setPhoneNumber(su.getContactInformation().getPhoneNumber());
        }
    
      return vo;
    }
View Full Code Here

Examples of org.sete.vo.admin.SeteUserVo

      return vo;
    }
   
    public SeteUserVo getSeteUser(String userId, boolean forDisplay) {
        SeteUser su = userDao.findById(Integer.valueOf(userId));
        SeteUserVo vo = new SeteUserVo();
        if(su != null){
          vo = this.makeUserVo(su);
          vo.setUserRoles(this.extractUserRoles(new ArrayList<UserRolePrivilege> (su.getUserRolePrivileges()), forDisplay));
        } else {
          final String msg = "Invalid SeteUser [id=" + userId + "] " +
      "submitted for update, operation aborted.";

      if(log.isErrorEnabled()) {
View Full Code Here

Examples of org.sete.vo.admin.SeteUserVo

        doAuthorization(request, false);

        CreateSeteUserForm csuf = (CreateSeteUserForm) form;

        SeteUserService service = getService(SeteUserService.class);
        SeteUserVo suvo = service.getSeteUser(request.getParameter("userId"), false);
        BeanUtils.copyProperties(csuf, suvo);

        return mapping.findForward(WebConstants.FORWARD_VIEW);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.