1 25 29 package org.jresearch.gossip.actions.admin.user; 30 31 import java.sql.SQLException ; 32 33 import javax.servlet.http.HttpServletRequest ; 34 import javax.servlet.http.HttpServletResponse ; 35 36 import org.apache.struts.action.ActionForm; 37 import org.apache.struts.action.ActionForward; 38 import org.apache.struts.action.ActionMapping; 39 import org.jresearch.gossip.IConst; 40 import org.jresearch.gossip.dao.UserDAO; 41 import org.jresearch.gossip.exception.SystemException; 42 import org.jresearch.gossip.forms.ProcessUserForm; 43 44 49 public class DeleteUserAction extends ManageUserAction { 50 64 public ActionForward process(ActionMapping mapping, ActionForm form, 65 HttpServletRequest request, HttpServletResponse response) 66 throws SystemException { 67 UserDAO dao = UserDAO.getInstance(); 68 ProcessUserForm puForm = (ProcessUserForm) form; 69 try { 70 71 setUpdatedLogin(dao.getUserName(Integer.parseInt(puForm.getUid()))); 72 dao.deleteUser(puForm.getUid()); 73 log(request, "logs.LOG9", "uid=" + puForm.getUid()); 74 } catch (SQLException sqle) { 75 getServlet().log("Connection.process", sqle); 76 throw new SystemException(sqle); 77 } 78 79 return (mapping.findForward(IConst.TOKEN.PAGE)); 80 } 81 } 82 | Popular Tags |