Package com.eforce.baby.auth.delegates

Examples of com.eforce.baby.auth.delegates.UserBD


        log.error("ERROR in createUser",e);
      }
      log.debug("Asking for UserBD");
      try
      {
        UserBD bd = (UserBD)BusinessDelegateFactory.getInstance().getDelegate("com.eteam.ems.auth.delegates.UserBD");
        log.debug("BD got, calling create User");
               
                HttpSession session = request.getSession();
                SessionUserVO sessUser = (SessionUserVO) session.getAttribute(IConstants.SESSION_ATTR_USER_SESSION_INFO);
        String dsName = sessUser.getDsName();
        String dbType = sessUser.getDbType();
               
                bd.createUser(dsName , dbType, userVO);
        log.debug("User Created Successfully !!!");
       
        request.setAttribute("fwd","/admin/User.do?target=viewUser&id="+userVO.getId());
        actionFrwd=mapping.findForward("pop_success");
       
View Full Code Here


                    )
                      throws IOException, ServletException
    {
      ActionForward actionFrwd = null;
     
      UserBD bd = (UserBD)BusinessDelegateFactory.getInstance().
                  getDelegate("com.eteam.ems.auth.delegates.UserBD");
      log.debug("calling findUser");
      HttpSession session = request.getSession();
      SessionUserVO sessUser = (SessionUserVO) session.getAttribute(IConstants.SESSION_ATTR_USER_SESSION_INFO);
      String dsName = sessUser.getDsName();
      String dbType = sessUser.getDbType();
            UserVO userVO = new UserVO();
      try
            {
        userVO = bd.findUser(dsName, dbType, request.getParameter("id"));
      }
            catch (DAOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
View Full Code Here

                      )
                    throws IOException, ServletException
    {
      ActionForward actionFrwd = null;
     
      UserBD bd = (UserBD)BusinessDelegateFactory.getInstance().
                  getDelegate("com.eteam.ems.auth.delegates.UserBD");
      log.debug("calling findUser");
      HttpSession session = request.getSession();
      SessionUserVO sessUser = (SessionUserVO) session.getAttribute(IConstants.SESSION_ATTR_USER_SESSION_INFO);
      String dsName = sessUser.getDsName();
      String dbType = sessUser.getDbType();
      UserVO userVO = new UserVO();
      try
      {
        userVO = bd.findUser(dsName, dbType, request.getParameter("id"));
      }
      catch (DAOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
View Full Code Here

          log.error("ERROR in updateUser",e);
        }
        log.debug("Asking for UserBD");
        try
        {
          UserBD bd = (UserBD)BusinessDelegateFactory.getInstance().getDelegate("com.eteam.ems.auth.delegates.UserBD");
          log.debug("BD got, calling updateUser User");
 
          HttpSession session = request.getSession();
          SessionUserVO sessUser = (SessionUserVO) session.getAttribute(IConstants.SESSION_ATTR_USER_SESSION_INFO);
          String dsName = sessUser.getDsName();
          String dbType = sessUser.getDbType();
 
          bd.updateUser(dsName , dbType, userVO);
          log.debug("User Updated Successfully !!!");
 
          request.setAttribute("fwd","/admin/User.do?target=viewUser&id="+userVO.getId());
          actionFrwd=mapping.findForward("pop_success");
 
View Full Code Here

      {
        ActionForward actionFrwd = null;
             
        try
        {
          UserBD bd = (UserBD)BusinessDelegateFactory.getInstance().getDelegate("com.eteam.ems.auth.delegates.UserBD");
          HttpSession session = request.getSession();
          SessionUserVO sessUser = (SessionUserVO) session.getAttribute(IConstants.SESSION_ATTR_USER_SESSION_INFO);
          String dsName = sessUser.getDsName();
          String dbType = sessUser.getDbType();
           
          bd.delete( dsName, dbType,request.getParameter("id"));
         
          actionFrwd = mapping.findForward(request.getParameter("target"));
        }
        catch (BusinessException be)
        {
View Full Code Here

            HashMap map = ConfigurationManager.getInstance().getCustomerList();
           
            log.debug("Cust Name: " + customerName);
            CustomerVO cvo = (CustomerVO) map.get(customerName);
            log.debug("Cust VO: " + cvo);
            UserBD userBD = (UserBD)BusinessDelegateFactory.getInstance().getDelegate("com.eteam.ems.auth.delegates.UserBD");
            log.debug(cvo.getDatasourceName()+ cvo.getDatabaseType());
            log.debug(userVO.getUserName()+ userVO.getPassword());

           
           
            // Authenticate
      userBD.authenticate(cvo.getDatasourceName(), cvo.getDatabaseType(), userVO.getUserName(), userVO.getPassword());
            //Authentication succeeded
           
            // Get user specific info from DB and save this in the user session
            SessionUserVO userSess = userBD.findUserSessionInfo(cvo.getDatasourceName(), cvo.getDatabaseType(), userVO.getUserName());
            userSess.setCustomer(cvo);
            userSess.setDsName(cvo.getDatasourceName());
            userSess.setDbType(cvo.getDatabaseType());
           
            // get user privileges
            UserPrivilegeList userPrivileges = userBD.findUserPrivileges(cvo.getDatasourceName(), cvo.getDatabaseType(), userVO.getUserName());
           
            HttpSession session = request.getSession();
           
            if(userSess.getProfileId() == null)
            {
              log.debug("Profile Id is null");
        /* Get UserID */
        String userID = userBD.findUserID(cvo.getDatasourceName(),cvo.getDatabaseType(),userVO.getUserName());
        userSess.setUserId(userID);
                userSess.setUserPrivilegeList(userPrivileges);
        session.setAttribute(IConstants.SESSION_ATTR_USER_SESSION_INFO, userSess);
        session.setAttribute(IConstants.SESSION_ATTR_HTTP_BINDING_LISTENER, new EEMSHTTPSessionBindingListener());
          log.debug("USER SESSION INFO: " + userSess.toString());
                log.debug("Setting User Login Id: " + userVO.getUserName());
                userSess.setUserLoginId(userVO.getUserName());
        //session.setAttribute("UserLoginID", userVO.getUserName());
        ////////////////////////////////////////////////////////////
        //request.setAttribute("redURL",dynaForm.getString("redURL"));
        if(dynaForm.getString("redURL").equals("/admin/list_customers.jsp"))
          actionFrwd = mapping.findForward("profileRedURL");
        ////////////////////////////////////////////////////////////
        else
          actionFrwd = mapping.findForward("profileURL");
            }
            else
            {
              /* If autoProfileUpdateEnabled is on */
        log.debug("Configuration : "+cvo.getConfigurationType());
        log.debug("Found Profile Id");
                userSess.setUserPrivilegeList(userPrivileges);
        session.setAttribute(IConstants.SESSION_ATTR_USER_SESSION_INFO, userSess);
        session.setAttribute(IConstants.SESSION_ATTR_HTTP_BINDING_LISTENER, new EEMSHTTPSessionBindingListener());
        log.debug("USER SESSION INFO: " + userSess.toString());
               
                /* Check if the forceprofile is enabled or not */
                String profileEnabled = "";
        profileEnabled = userBD.findProfileEnabled(cvo.getDatasourceName(), cvo.getDatabaseType());
               
        //if(cvo.getAutoProfileUpdateEnabled()!= null && cvo.getAutoProfileUpdateEnabled().equals("Y")){
        if(profileEnabled!= null && profileEnabled.equals(IConstants.FORCE_PROFILE_ENABLED))
                {
                  ////////////////////////////////////////////////////////////
View Full Code Here

TOP

Related Classes of com.eforce.baby.auth.delegates.UserBD

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.