Package org.jresearch.gossip.forms

Examples of org.jresearch.gossip.forms.ProcessModForm


        throws SystemException {
        MessageResources messages = getResources(request);
        ForumDAO dao = ForumDAO.getInstance();
        UserDAO userdao = UserDAO.getInstance();
    Configurator config=Configurator.getInstance();
    ProcessModForm pmForm = (ProcessModForm) form;

        try {

            dao.dropMod(pmForm.getFid(),pmForm.getName());

            int newStatus = 0;

            if (dao.isUserMod(pmForm.getName())) {
                newStatus = UserStatus.MOD;
            } else {
                newStatus = UserStatus.USER;
            }

            userdao.setUserStatus(pmForm.getName(),
                newStatus);
            log(request, "logs.LOG10",
                newStatus + " name=" +
        pmForm.getName());

            setUpdatedLogin(pmForm.getName());
        } catch (SQLException sqle) {
            getServlet().log("Connection.process", sqle);
            throw new SystemException(sqle);
        }

        return (new ActionForward("ShowUser.do?uid=" +
            pmForm.getName(), true));
    }
View Full Code Here


  public ActionForward process(ActionMapping mapping, ActionForm form,
      HttpServletRequest request, HttpServletResponse response)
      throws SystemException {
    ForumDAO dao = ForumDAO.getInstance();
    UserDAO userdao = UserDAO.getInstance();
    ProcessModForm pmForm = (ProcessModForm) form;
    try {
      dao.addMod(pmForm.getFid(), pmForm.getName());
      userdao.setUserStatus(pmForm.getName(), UserStatus.MOD);
      setUpdatedLogin(pmForm.getName());
    } catch (SQLException sqle) {
      getServlet().log("Connection.process", sqle);
      throw new SystemException(sqle);
    }
    return (new ActionForward("ShowUser.do?uid=" + pmForm.getName(), true));
  }
View Full Code Here

TOP

Related Classes of org.jresearch.gossip.forms.ProcessModForm

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.