Package org.nemesis.forum

Examples of org.nemesis.forum.ForumThread


            + " You may wish to delete the message from your database.");
        return null;
      }

      Forum forum = null;
      ForumThread thread = null;
      try {
        forum = factory.getForum(forumID);
        //Now, get the thread
        thread = forum.getThread(threadID);
      } catch (Exception e) {
View Full Code Here


      Iterator threadIterator = forum.threads(start,maxPageItems); //start,range

      ThreadBean tb = null;

      while (threadIterator.hasNext()) {
        ForumThread currentThread = (ForumThread) threadIterator.next();
        tb = new ThreadBean();
        tb.setId(currentThread.getID());
        tb.setForumID(forum.getID());
        tb.setCreationDate(currentThread.getCreationDate());
        tb.setModifiedDate(currentThread.getModifiedDate());
        tb.setApproved(currentThread.isApproved());
        tb.setNotApprovedMessages(currentThread.getMessageCount(false));
        tb.setReplies(currentThread.getMessageCount() - 1);
        tb.setTopic(currentThread.getName());

        Message rootMessage = currentThread.getRootMessage();
        MessageBean mb = new MessageBean();
        mb.setAnonymous(rootMessage.isAnonymous());
       
        UserBean ub = new UserBean();
        if(!rootMessage.isAnonymous()){
View Full Code Here

        ForumFactory forumFactory = ForumFactory.getInstance(getAuthToken(request));
        Forum forum = forumFactory.getForum(Integer.parseInt(request.getParameter("id")));
        //check permission
        checkPermission(request,OperationConstants.LIST_FORUM_CONTENT,forum);
       
        ForumThread t=forum.getThread(Integer.parseInt(request.getParameter("threadID")));
        Message m=t.getMessage(Integer.parseInt(request.getParameter("messageID")));
        m.setApproved(!m.isApproved());
        if (t.getRootMessage().getID()==m.getID()) t.setApproved(m.isApproved());
       
       
    } catch (Exception e) {
      String eid=this.getClass().getName()+"_"+System.currentTimeMillis();
      log.error("eid:"+eid +"\nsessionID" +request.getSession().getId(),e;     
View Full Code Here

      //fb.setApprovedThreads();
      //fb.setThreads(forum.getThreadCount());
      //fb.setMessages(forum.getMessageCount());
      request.setAttribute("fb", fb);

      ForumThread thread = forum.getThread(Integer.parseInt(request.getParameter("threadID")));
      ThreadBean tb = new ThreadBean();
      tb.setId(thread.getID());
      tb.setForumID(forum.getID());
      tb.setCreationDate(thread.getCreationDate());
      tb.setModifiedDate(thread.getModifiedDate());
      tb.setApproved(thread.isApproved());
     
      tb.setNotApprovedMessages(thread.getMessageCount(false));
      tb.setMessages(thread.getMessageCount());
      tb.setReplies(thread.getMessageCount() - 1);
      tb.setTopic(thread.getName());
     

      TreeWalker walker = thread.treeWalker();
      Message rootMessage = walker.getRoot();
      populate(walker,tb,rootMessage,0);
     
     
View Full Code Here

TOP

Related Classes of org.nemesis.forum.ForumThread

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.