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);
}