Examples of Conversation


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

        threadBuilder.populate(thread, threadUi);
        anchor.detach(threadUi);
        blipUi.getMeta().createInlineAnchorBefore(null, thread).attach(threadUi);
      }
      for (ConversationBuilder conversationBuilder : privates) {
        Conversation conversation = wave.createConversation();
        conversation.setAnchor(blip.getConversation().createAnchor(blip));
        assert conversation.hasAnchor();
        conversationBuilder.populate(
            conversation, blipUi.insertConversationBefore(null, conversation));
     }
    }
View Full Code Here

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

    wave = createSample();
  }

  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();
View Full Code Here

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

    wave = FakeConversationView.builder().build();
    target = new DiffController(wave, supplement, documents, models);
  }

  public void testFreshBlipsAreSuppressedOnStartup() {
    Conversation conv = wave.createRoot();
    ConversationBlip root = conv.getRootThread().appendBlip();

    MockDoc fresh = mock(MockDoc.class);
    when(fresh.isCompleteDiff()).thenReturn(true, false);
    when(documents.get(root)).thenReturn(fresh);
    target.install();
View Full Code Here

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

    verify(fresh).startDiffSuppression();
    verify(fresh, never()).stopDiffSuppression();
  }

  public void testReadBlipsNotSuppressedOnStartup() {
    Conversation conv = wave.createRoot();
    ConversationBlip root = conv.getRootThread().appendBlip();

    MockDoc seen = mock(MockDoc.class);
    when(seen.isCompleteDiff()).thenReturn(false);
    when(documents.get(root)).thenReturn(seen);
    target.install();
View Full Code Here

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

    verify(seen, never()).startDiffSuppression();
    verify(seen, never()).stopDiffSuppression();
  }

  public void testDynamicFreshBlipsAreSuppressed() {
    Conversation conv = wave.createRoot();

    target.install();

    // Instrument first.
    MockDoc doc = mock(MockDoc.class);
    when(doc.isCompleteDiff()).thenReturn(true, false);
    when(documents.get(any(ConversationBlip.class))).thenReturn(doc);

    conv.getRootThread().appendBlip();

    verify(doc).startDiffSuppression();
    verify(doc, never()).stopDiffSuppression();
  }
View Full Code Here

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

    this.followPolicy = followPolicy;
  }

  @Override
  public ThreadState getThreadState(ConversationThread thread) {
    Conversation c = thread.getConversation();
    String id = c.getId();
    return supplement.getThreadState(WaveletBasedConversation.widFor(id), thread.getId());
  }
View Full Code Here

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

      return ids;
    }

    @Override
    public HashedVersion getSignature(WaveletId id) {
      Conversation c = view.getConversation(WaveletBasedConversation.idFor(id));
      return (null != c) ?
          ((WaveletBasedConversation) c).getWavelet().getHashedVersion()
          : HashedVersion.unsigned(0);
    }
View Full Code Here

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

          : HashedVersion.unsigned(0);
    }

    @Override
    public long getVersion(WaveletId id) {
      Conversation c = view.getConversation(WaveletBasedConversation.idFor(id));
      return c != null ?
          // TODO(user): Once bug 2820511 is fixed, get rid of the cast.
          ((WaveletBasedConversation) c).getWavelet().getVersion()
          : PrimitiveSupplement.NO_VERSION;
    }
View Full Code Here

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

          : PrimitiveSupplement.NO_VERSION;
    }

    @Override
    public Map<String, Long> getBlipVersions(WaveletId id) {
      Conversation c = view.getConversation(WaveletBasedConversation.idFor(id));
      Map<String, Long> blipVersions = new HashMap<String, Long>();
      for (ConversationBlip blip : BlipIterators.breadthFirst(c)) {
        blipVersions.put(blip.getId(), blip.getLastModifiedVersion());
      }
      return blipVersions;
View Full Code Here

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

    // conversation promoted to first. Project out the participants of those
    // conversations into a list.
    // 2. The digest author is the first participant in that list.
    // 3. The participant snippet is the next PARTICIPANT_SNIPPET_SIZE unique
    // participants in that list.
    Conversation main = ConversationStructure.getMainConversation(wave.getConversations());
    List<Conversation> conversations = CollectionUtils.newLinkedList();
    conversations.addAll(wave.getConversations().getConversations());
    // Waves are not forced to have conversations in them, so it is legitimate
    // for main to be null.
    if (main != null) {
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.