1 5 6 package com.quikj.application.communicator.applications.webtalk.controller; 7 8 import com.quikj.application.communicator.admin.model.*; 9 import javax.servlet.http.*; 10 import org.apache.struts.action.*; 11 12 import java.sql.*; 13 import java.util.*; 14 15 19 public class DisplayGroupWizardCancelAction extends Action 20 { 21 22 23 public DisplayGroupWizardCancelAction() 24 { 25 } 26 27 public ActionForward execute(ActionMapping mapping, 28 ActionForm form, 29 HttpServletRequest request, 30 HttpServletResponse response) 31 { 32 ActionErrors errors = new ActionErrors(); 33 34 Connection c = (Connection)request.getSession().getAttribute("connection"); 35 if (c == null) 36 { 37 errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.not.logged.in")); 38 saveErrors(request, errors); 39 40 return mapping.findForward("logon"); 41 } 42 43 AccountElement element = (AccountElement)request.getSession().getAttribute("userInfo"); 44 if (element.isAdminLevel() == false) 45 { 46 errors.add(ActionErrors.GLOBAL_ERROR, 47 new ActionError("error.insufficient.privilege")); 48 saveErrors(request, errors); 49 50 return mapping.findForward("main_menu"); 51 } 52 53 ArrayList log = (ArrayList) request.getSession().getAttribute("groupWizardLog"); 54 55 if (log == null) 56 { 57 return mapping.findForward("Exit"); 58 } 59 60 return mapping.getInputForward(); 61 } 62 } 63 | Popular Tags |