1 23 27 package org.jresearch.gossip.actions.admin.topic; 28 29 import java.sql.SQLException ; 30 31 import javax.servlet.http.HttpServletRequest ; 32 import javax.servlet.http.HttpServletResponse ; 33 34 import org.apache.struts.action.ActionForm; 35 import org.apache.struts.action.ActionForward; 36 import org.apache.struts.action.ActionMapping; 37 import org.jresearch.gossip.actions.BaseAction; 38 import org.jresearch.gossip.dao.ForumDAO; 39 import org.jresearch.gossip.exception.SystemException; 40 import org.jresearch.gossip.forms.ProcessTopicForm; 41 42 47 public class MoveTopicAction extends BaseAction { 48 62 public ActionForward process(ActionMapping mapping, ActionForm form, 63 HttpServletRequest request, HttpServletResponse response) 64 throws SystemException { 65 ForumDAO dao = ForumDAO.getInstance(); 66 ProcessTopicForm ptForm = (ProcessTopicForm) form; 67 try { 68 69 dao.moveThread(ptForm.getTid(), ptForm.getFid()); 70 log(request, "logs.LOG24", ptForm.getTid() + " to forum fid=" 71 + ptForm.getFid()); 72 } catch (SQLException sqle) { 73 getServlet().log("Connection.process", sqle); 74 throw new SystemException(sqle); 75 } 76 return (new ActionForward("/ShowForum.do?fid=" + ptForm.getFid(), true)); 77 } 78 } | Popular Tags |