Examples of ForumDAO


Examples of org.jresearch.gossip.dao.ForumDAO

      HttpServletRequest request, HttpServletResponse response)
      throws SystemException {
    HttpSession session = request.getSession();
    User user = (User) session.getAttribute(IConst.SESSION.USER_KEY);
    ProcessTopicForm ptForm = (ProcessTopicForm) form;
    ForumDAO dao = ForumDAO.getInstance();
    try {
      if (!dao.checkMod(Integer.parseInt(ptForm.getFid()), user)) {
        return (mapping.findForward(IConst.TOKEN.DENIED));
      }
     
      dao.deleteThread(ptForm.getTid(), true);
      log(request, "logs.LOG15", ptForm.getTid());
    } catch (SQLException sqle) {
      getServlet().log("Connection.process", sqle);
      throw new SystemException(sqle);
    }
View Full Code Here

Examples of org.jresearch.gossip.dao.ForumDAO

        HttpServletRequest request, HttpServletResponse response)
        throws SystemException {
        HttpSession session = request.getSession();
        User user = (User) session.getAttribute(IConst.SESSION.USER_KEY);
        MessageResources messages = getResources(request);
        ForumDAO forumDAO = ForumDAO.getInstance();

        try {

            request.setAttribute(IConst.REQUEST.GROUPS_KEY,
                forumDAO.getGroups(user.getStatus(), true));
        } catch (SQLException sqle) {
            getServlet().log("Connection.process", sqle);
            throw new SystemException(sqle);
        }
View Full Code Here

Examples of org.jresearch.gossip.dao.ForumDAO

public abstract class SaveRankAction extends BaseAction {

    protected ActionForward process(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response)
            throws JGossipException {
        ForumDAO dao = ForumDAO.getInstance();
        RankForm rForm = (RankForm) form;
        try {
            int count = Integer.parseInt(rForm.getCount());
            int id = -1;
            try {
                id = Integer.parseInt(rForm.getId());
            } catch (NumberFormatException e) {
                id = -1;
            }
            List records = dao.getRankList();
            Iterator it = records.iterator();
            while (it.hasNext()) {
                RankInfoDTO curr = (RankInfoDTO) it.next();
                if (curr.getCount() == count && curr.getId() != id) {
                    ActionErrors errors = new ActionErrors();
View Full Code Here

Examples of org.jresearch.gossip.dao.ForumDAO

   * @return DOCUMENT ME!
   */
  public ActionForward process(ActionMapping mapping, ActionForm form,
      HttpServletRequest request, HttpServletResponse response)
      throws SystemException {
    ForumDAO dao = ForumDAO.getInstance();
    try {
     
      int[] wasDeleted = dao
          .dropOld(((DropOldMessForm) form).getIntime());
      log(request, "logs.LOG16");
      setStatusMessage(request, "mails.DONE", Integer
          .toString(wasDeleted[0]), Integer.toString(wasDeleted[1]));
    } catch (SQLException sqle) {
View Full Code Here

Examples of org.jresearch.gossip.dao.ForumDAO

      HttpServletRequest request, HttpServletResponse response)
      throws SystemException {
    HttpSession session = request.getSession();
    MessageForm messageForm = new MessageForm();
    ProcessMessageForm pmForm = (ProcessMessageForm) form;
    ForumDAO dao = ForumDAO.getInstance();
    User user = (User) session.getAttribute(IConst.SESSION.USER_KEY);
    try {
     
      int fid = Integer.parseInt(pmForm.getFid());
      boolean isUserMod = dao.checkMod(fid, user);
      Forum currForum = dao.getForumInfo(fid);
      //      check access rights if forum invisible
      getServlet().log("check access rights if forum invisible");
      if ((currForum.getLocked() == IConst.Forum.STATUS_INVISIBLE)
          && (user.getStatus() < Integer.parseInt(Configurator
              .getInstance().get(IConst.CONFIG.INVADER1)))) {
        return (mapping.findForward(IConst.TOKEN.DENIED));
      }
      Topic currThread = dao.getThreadInfo(Integer.parseInt(pmForm
          .getTid()));
      // check user access rights if current topic or completely forum is
      // locked
      getServlet()
          .log(
              "check user access rights if current topic or completely forum is locked");
      if (((currThread.getLocked() == IConst.Topic.STATUS_LOCKED) || (currForum
          .getLocked() == IConst.Forum.STATUS_COMPLETELY_LOCKED))
          && (!isUserMod)) {
        return (mapping.findForward(IConst.TOKEN.DENIED));
      }
      session.setAttribute(IConst.REQUEST.CURR_THREAD, currThread);
      currThread.setSubject(dao.getThreadSubject(pmForm.getTid()));
      Message mess = dao.getMessage(pmForm.getMid());
      if (mess == null) {
        return (new ActionForward("/ShowThread.do?fid="
            + pmForm.getFid() + "&tid=" + pmForm.getTid()
            + "&block=" + pmForm.getBlock(), true));
      } else {
View Full Code Here

Examples of org.jresearch.gossip.dao.ForumDAO

     * @return DOCUMENT ME!
     */
    public ActionForward process(ActionMapping mapping, ActionForm form,
        HttpServletRequest request, HttpServletResponse response)
        throws SystemException {
        ForumDAO dao = ForumDAO.getInstance();

        try {
           

            dao.addForum((ForumForm) form);

            log(request, "logs.LOG3", ((ForumForm) form).getForum_name());
        } catch (SQLException sqle) {
            getServlet().log("Connection.process", sqle);
            throw new SystemException(sqle);
View Full Code Here

Examples of org.jresearch.gossip.dao.ForumDAO

      HttpServletRequest request, HttpServletResponse response)
      throws SystemException {
    HttpSession session = request.getSession();
    User user = (User) session.getAttribute(IConst.SESSION.USER_KEY);
    ProcessTopicForm ptForm = (ProcessTopicForm) form;
    ForumDAO dao = ForumDAO.getInstance();
    try {
      if (!dao.checkMod(Integer.parseInt(ptForm.getFid()), user)) {
        return (mapping.findForward(IConst.TOKEN.DENIED));
      }
     
      dao.lockThread(ptForm.getTid());
      log(request, "logs.LOG21", ptForm.getTid());
    } catch (SQLException sqle) {
      getServlet().log("Connection.process", sqle);
      throw new SystemException(sqle);
    }
View Full Code Here

Examples of org.jresearch.gossip.dao.ForumDAO

   *      javax.servlet.http.HttpServletResponse)
   */
  protected ActionForward process(ActionMapping mapping, ActionForm form,
      HttpServletRequest request, HttpServletResponse response)
      throws JGossipException {
    ForumDAO dao = ForumDAO.getInstance();
    ProcessItemForm piForm = (ProcessItemForm) form;
    RankForm rForm;
    if (request.getAttribute("rankForm") == null) {
      try {
        RankInfoDTO info = dao.getRankInfo(Integer.parseInt(piForm
            .getId()));
        rForm = new RankForm();
        BeanUtils.copyProperties(rForm, info);
      } catch (SQLException e) {
        throw new SystemException(e);
View Full Code Here

Examples of org.jresearch.gossip.dao.ForumDAO

     * @return DOCUMENT ME!
     */
    public ActionForward process(ActionMapping mapping, ActionForm form,
        HttpServletRequest request, HttpServletResponse response)
        throws SystemException {
        ForumDAO dao = ForumDAO.getInstance();
        ProcessLockForumForm plfForm = (ProcessLockForumForm) form;

        try {
           

            dao.lockForum(plfForm.getForumid(),
                Integer.parseInt(plfForm.getLocked()));
            log(request, "logs.LOG20",plfForm.getForumid());
            setStatusMessage(request, "status.FORUM_LOCKED", plfForm.getLocked());
        } catch (SQLException sqle) {
            getServlet().log("Connection.process", sqle);
View Full Code Here

Examples of org.jresearch.gossip.dao.ForumDAO

   * @return DOCUMENT ME!
   */
  public ActionForward process(ActionMapping mapping, ActionForm form,
      HttpServletRequest request, HttpServletResponse response)
      throws SystemException {
    ForumDAO dao = ForumDAO.getInstance();
    ProcessTopicForm ptForm = (ProcessTopicForm) form;
    try {
     
      dao.moveThread(ptForm.getTid(), ptForm.getFid());
      log(request, "logs.LOG24", ptForm.getTid() + " to forum fid="
          + ptForm.getFid());
    } catch (SQLException sqle) {
      getServlet().log("Connection.process", sqle);
      throw new SystemException(sqle);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.