Package org.waveprotocol.wave.model.conversation

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


  public void testInitialRendering() {
    // Just check that nothing crashes during setUp.
  }

  public void testLiveRenderingCommutesOnBlipAppend() {
    ConversationThread root = wave.getRoot().getRootThread();
    root.appendBlip();
    assertEquals(render().toString(), rendering.toString());
  }
View Full Code Here


    root.appendBlip();
    assertEquals(render().toString(), rendering.toString());
  }

  public void testLiveRenderingCommutesOnBlipInsert() {
    ConversationThread root = wave.getRoot().getRootThread();
    root.insertBlip(Iterables.get(root.getBlips(), 1));

    assertEquals(render().toString(), rendering.toString());
  }
View Full Code Here

    assertEquals(render().toString(), rendering.toString());
  }

  public void testLiveRenderingCommutesOnBlipDelete() {
    ConversationThread root = wave.getRoot().getRootThread();
    root.getFirstBlip().delete();

    assertEquals(render().toString(), rendering.toString());
  }
View Full Code Here

      this.privates = privates;
    }

    void populate(ConversationBlip blip, FakeBlipView blipUi) {
      for (ThreadBuilder threadBuilder : unanchored) {
        ConversationThread thread = blip.addReplyThread();
        threadBuilder.populate(thread, blipUi.insertDefaultAnchorBefore(null, thread).getThread());
      }
      for (ThreadBuilder threadBuilder : anchored) {
        ConversationThread thread = blip.addReplyThread(blip.getContent().size() - 1);
        FakeAnchor anchor = blipUi.insertDefaultAnchorBefore(null, thread);
        FakeInlineThreadView threadUi = anchor.getThread();
        threadBuilder.populate(thread, threadUi);
        anchor.detach(threadUi);
        blipUi.getMeta().createInlineAnchorBefore(null, thread).attach(threadUi);
View Full Code Here

  }

  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

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

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

    thread.appendBlip();
    thread.appendBlip();
  }

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

    sampleReply(thread.appendBlip());
    thread.appendBlip();
  }

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

        for (ConversationBlip child : eventDataConverter.findBlipChildren(requiredBlip)) {
          ContextResolver.addBlipToEventMessages(
              eventMessageBundle, child, wavelet, eventDataConverter);
        }
      }
      ConversationThread containingThread = requiredBlip.getThread();
      if (contextSet.contains(Context.PARENT)) {
        ConversationBlip parent = eventDataConverter.findBlipParent(requiredBlip);
        if (parent != null) {
          ContextResolver.addBlipToEventMessages(
              eventMessageBundle, parent, wavelet, eventDataConverter);
        }
      }
      if (contextSet.contains(Context.SIBLINGS)) {
        for (ConversationBlip blip : containingThread.getBlips()) {
          if (blip != requiredBlip) {
            ContextResolver.addBlipToEventMessages(
                eventMessageBundle, blip, wavelet, eventDataConverter);
          }
        }
View Full Code Here

  public static void addAllBlipsToEventMessages(EventMessageBundle eventMessageBundle,
      Conversation conversation, Wavelet wavelet, EventDataConverter eventDataConverter) {
    Queue<ConversationThread> threads = new LinkedList<ConversationThread>();
    threads.add(conversation.getRootThread());
    while (!threads.isEmpty()) {
      ConversationThread thread = threads.remove();
      for (ConversationBlip blip : thread.getBlips()) {
        addBlipToEventMessages(eventMessageBundle, blip, wavelet, eventDataConverter);
        for (ConversationThread replyThread : blip.getReplyThreads()) {
          threads.add(replyThread);
        }
      }
View Full Code Here

TOP

Related Classes of org.waveprotocol.wave.model.conversation.ConversationThread

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.