Package com.centraview.login

Examples of com.centraview.login.Login


    HashMap hm = null;
    getPATH();
    try {
      InitialContext ic = CVUtility.getInitialContext();
      LoginHome lh = (LoginHome) ic.lookup("Login");
      Login remote = (Login) lh.create();
      remote.setDataSource(dataSource);
      hm = (HashMap) remote.authenticateUser(userName, passwd);
      //checking hashmap
      if (hm != null && hm.get("userid")!= null && hm.get("individualid")!= null && hm.get("lastName")!= null && hm.get("firstName")!= null ) {
        session.set("authenticateUserHashMap", hm);
        authenticationString = AUTHENTICATION_SUCCESS_STATUS;
        //QBSyncHome qbsh = (QBSyncHome) CVUtility.getHomeObject("com.centraview.qbsync.QBSyncHome", "QBSync");
View Full Code Here


      if (lh == null) {
        return (mapping.findForward("dataerror"));
      }

      Login remote = lh.create();
      remote.setDataSource(dataSource);
      usrResult = remote.authenticateUser(username, password);
      // Check to make sure the usrResult has all the fields we expect of it.
      // if so then it was a valid login, if not, then we will fail with a general
      // authentication error.
      if (usrResult.containsKey("individualid") && usrResult.containsKey("firstName") && usrResult.containsKey("lastName") && usrResult.containsKey("type")) {
        int individualId = Integer.parseInt((String)usrResult.get("individualid"));
        userType = (String)usrResult.get("type");
        String firstName = (String)usrResult.get("firstName");
        String lastName = (String)usrResult.get("lastName");

        if ((! userType.equalsIgnoreCase((String)daf.get("userType"))) && ! ("EMPLOYEE".equals(daf.get("userType")) && userType.equalsIgnoreCase("ADMINISTRATOR"))) {
          String errorHeader = "Error occurred during login.";
          errorMap.put(new Integer(0), errorHeader);
          String error = "The username or password was incorrect, or the user is disabled.";
          errorMap.put(new Integer(1), error);
          request.setAttribute("error", errorMap);
          FORWARD_final = GLOBAL_FORWARD_failure;
          return (mapping.findForward(FORWARD_final));
        }

        userObject = remote.getUserObject(individualId, firstName, lastName, userType);
        userObject.setLoginName(username);

        // In a certain case we will need a blank rights matrix, so prepare the remote connection now.
        AuthorizationHome ah = (AuthorizationHome)CVUtility.getHomeObject("com.centraview.administration.authorization.AuthorizationHome","Authorization");
        Authorization authorizationRemote = ah.create();
View Full Code Here

      formEmail = (String)fpf.getEmail();

      HttpSession session = request.getSession(true);
     
      // EJB
      Login remote = (Login)lh.create();
      remote.setDataSource(dataSource);
      HashMap resultHashMap = remote.getForgottenPassword(formUserName, formEmail);
      String rand = "";
      int userid = 0;
      int individualID = 0;

      if ((String)resultHashMap.get("noemail") ==  null) {
View Full Code Here

TOP

Related Classes of com.centraview.login.Login

Copyright © 2018 www.massapicom. 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.