Examples of ConversationThread


Examples of org.fenixedu.academic.domain.messaging.ConversationThread

    }

    private ActionForward viewThreadOnPage(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response, Integer pageNumber) throws FenixServiceException {

        ConversationThread thread = this.getRequestedThread(request);
        request.setAttribute("thread", thread);

        request.setAttribute("pageNumber", pageNumber);
        request.setAttribute("pageNumbers", computeNumberOfPages(DEFAULT_PAGE_SIZE, thread.getMessageSet().size()));
        request.setAttribute("messages", getContentToDisplay(thread.getMessageSet(), pageNumber, DEFAULT_PAGE_SIZE));

        Person loggedPerson = getLoggedPerson(request);
        request.setAttribute("person", loggedPerson);

        Forum forum = getRequestedForum(request);
View Full Code Here

Examples of org.fenixedu.academic.domain.messaging.ConversationThread

    }

    private static void copyThreads(ExecutionCourseForum sourceForum, ExecutionCourseForum targetForum) {

        while (!sourceForum.getConversationThreadSet().isEmpty()) {
            ConversationThread sourceConversationThread = sourceForum.getConversationThreadSet().iterator().next();

            if (!targetForum.hasConversationThreadWithSubject(sourceConversationThread.getTitle())) {
                sourceConversationThread.setForum(targetForum);
            } else {
                ConversationThread targetConversionThread =
                        targetForum.getConversationThreadBySubject(sourceConversationThread.getTitle());
                for (ConversationMessage message : sourceConversationThread.getMessageSet()) {
                    message.setConversationThread(targetConversionThread);
                }
                sourceForum.removeConversationThread(sourceConversationThread);
View Full Code Here

Examples of org.fenixedu.academic.domain.messaging.ConversationThread

    protected void run(CreateConversationThreadAndMessageBean createConversationThreadAndMessageBean) {

        Person creator = createConversationThreadAndMessageBean.getCreator();

        ConversationThread conversationThread =
                createConversationThreadAndMessageBean.getForum().createConversationThread(creator,
                        createConversationThreadAndMessageBean.getSubject());

        ConversationMessage conversationMessage =
                conversationThread.createConversationMessage(creator, createConversationThreadAndMessageBean.getBody());
        super.sendNotifications(conversationMessage);

    }
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.ConversationThread

          waveletFactory, waveData.getWaveId(), gen, sampleAuthor, WaveletConfigurator.ADD_CREATOR);

      // Build a conversation in that wave.
      ConversationView v = WaveBasedConversationView.create(wave, gen);
      Conversation c = v.createRoot();
      ConversationThread root = c.getRootThread();
      sampleReply(root.appendBlip());
      write(root.appendBlip());
      write(root.appendBlip());
      write(root.appendBlip());

      return waveData;
    }
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.ConversationThread

      d.appendXml(XmlStringBuilder.createFromXmlString("<body><line></line>Hello World</body>"));
    }

    private static void sampleReply(ConversationBlip blip) {
      write(blip);
      ConversationThread thread = blip.addReplyThread(8);
      write(thread.appendBlip());
    }
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.ConversationThread

      write(thread.appendBlip());
    }

    private static void biggerSampleReply(ConversationBlip blip) {
      write(blip);
      ConversationThread thread = blip.addReplyThread();
      sampleReply(thread.appendBlip());
      sampleReply(thread.appendBlip());
      write(thread.appendBlip());
    }
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.ConversationThread

    }

    countUpEvent();

    // Handle the event for all parent threads.
    ConversationThread thread = blip.getThread();
    while (thread != null) {
      ThreadReadState state = threadStates.get(thread);
      if (state != null) {
        state.handleBlipAdded(blip);
        registerEventIfMonitored(state);
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.ConversationThread

    }

    countUpEvent();

    // Handle the event for all parent threads.
    ConversationThread thread = blip.getThread();
    while (thread != null) {
      ThreadReadState state = threadStates.get(thread);
      if (state != null) {
        state.handleBlipRemoved(blip);
        registerEventIfMonitored(state);
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.ConversationThread

  protected abstract BlockStructure create(ConversationView model);

  private static ConversationView createSample() {
    ConversationView v = FakeConversationView.builder().build();
    Conversation c = v.createRoot();
    ConversationThread root = c.getRootThread();
    sampleReply(root.appendBlip());
    root.appendBlip();
    root.appendBlip();
    biggerSampleReply(root.appendBlip());
    root.appendBlip();
    root.appendBlip();
    biggestSampleReply(root.appendBlip());
    root.appendBlip();
    biggerSampleReply(root.appendBlip());
    sampleReply(root.appendBlip());
    return v;
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.ConversationThread

    sampleReply(root.appendBlip());
    return v;
  }

  private static void sampleReply(ConversationBlip blip) {
    ConversationThread thread = blip.addReplyThread();
    thread.appendBlip();
    thread.appendBlip();
  }
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.