Package com.ateam.webstore.handlers

Examples of com.ateam.webstore.handlers.EmployeeHandler


    View v = null;   
   
      if (vis != null && vis.isEmployeeAuthenticated()) {
       
        if (req.getParameterMap().containsKey(Parameters.LOGIN.getId())) {
          EmployeeHandler eh = new EmployeeHandler(req);
          v = eh.getLoginView(null);
        }
        if (req.getParameterMap().containsKey(Parameters.LOGOUT.getId())) {
          EmployeeHandler eh = new EmployeeHandler(req);
          v = eh.getLogoutView();
        }
        else if (req.getParameterMap().containsKey(Parameters.ALL_PRODUCTS.getId())) {
          ProductHandler ph = new ProductHandler(req);
          v = ph.getAllView(true);
        }
        else if (req.getParameterMap().containsKey(Parameters.ALL_ORDERS.getId())) {
          OrderHandler oh = new OrderHandler(req);
          v = oh.getAllView(false);
        }
        else if (req.getParameterMap().containsKey(Parameters.EMPLOYEE.getId())) {
          EmployeeHandler eh = new EmployeeHandler(req);
          v = eh.getEmployeeDetailsView();
        }
        else if (req.getParameterMap().containsKey(Parameters.ALL_EMPLOYEES.getId())) {
          EmployeeHandler eh = new EmployeeHandler(req);
          v = eh.getEmployeeListView();
        }
        else if (req.getParameterMap().containsKey(Parameters.ADD_EMPLOYEE.getId())) {
          EmployeeHandler eh = new EmployeeHandler(req);
          v = eh.getAdminAddEmployeeView(null);
        }
        else if (req.getParameterMap().containsKey(Parameters.ORDER_ID.getId())) {
          OrderHandler oh = new OrderHandler(req);
          v = oh.getOrderDetailsView(null,true);
        }
View Full Code Here


      else if (formId.equals(FormName.EDIT_PRODUCT.getId())) {
        ProductHandler ph = new ProductHandler(req);
        return ph.processEditProductRequest();
      }
      else if (formId.equals(FormName.REGISTER.getId())) {
        EmployeeHandler eh = new EmployeeHandler(req);
        return eh.processAddEmployeeRequest();
      }
      else if (formId.equals(FormName.DELETE_EMPLOYEE.getId())) {
        EmployeeHandler eh = new EmployeeHandler(req);
        return eh.processDeleteEmployeeRequest();
      }
      else if (formId.equals(FormName.ORDER_UPDATE.getId())) {
        OrderHandler oh = new OrderHandler(req);
        return oh.processOrderUpdateRequest();
      }
      else if (formId.equals(FormName.SEARCH.getId())) {
        ProductHandler ph = new ProductHandler(req);
        return ph.search(true);
      }
      else {
        l.warning("unknown formId:"+formId);
        throw new Exception();
      }
    }
    else {
      if (formId.equals(FormName.LOGIN.getId())) {
        EmployeeHandler h = new EmployeeHandler(req);
        return h.processLoginRequest();
      }
      else {
        l.warning("unknown formId:"+formId);
        throw new Exception();
      }
View Full Code Here

TOP

Related Classes of com.ateam.webstore.handlers.EmployeeHandler

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.