Package org.waveprotocol.wave.model.conversation

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


          : 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

  /**
   * @return the most recently modified blip.
   */
  public BlipView selectMostRecentlyModified() {
    Conversation conversation  = wave.getRoot();
    if (conversation == null) {
      return null;
    } else {
      ConversationBlip blip = wave.getRoot().getRootThread().getFirstBlip();
      BlipView rootBlipUi = views.getBlipView(blip);
View Full Code Here

  /**
   * @return the root blip of the currently displayed wave.
   */
  public BlipView getOrFindRootBlip() {
    if (rootBlip == null) {
      Conversation conversation  = wave.getRoot();
      if (conversation == null) {
        return null;
      } else {
        ConversationBlip blip = wave.getRoot().getRootThread().getFirstBlip();
        BlipView rootBlipUi = views.getBlipView(blip);
View Full Code Here

   */
  public BlipView selectBlipByWaveRef(WaveRef waveRef) {
    // Determine if waveRef has a documentId in it - if so, the referenced blip
    // should receive the focus on wave load.
    // First find conversation
    Conversation conversation;
    String documentId = null;
    if (waveRef != null && waveRef.hasWaveletId()) {
      String id = ModernIdSerialiser.INSTANCE.serialiseWaveletId(waveRef.getWaveletId());
      documentId = waveRef.getDocumentId();
      conversation = wave.getConversation(id);
View Full Code Here

    processConversationView(model);
  }

  public void processConversationView(ConversationView view) {
    generator.startView(view);
    Conversation root = structure.getMainConversation();
    if (root != null) {
      processConversation(root);
    }
    generator.endView(view);
  }
View Full Code Here

  }

  @Override
  public R render(ConversationView wave) {
    IdentityMap<Conversation, R> conversations = CollectionUtils.createIdentityMap();
    Conversation c = structure.getMainConversation();
    if (c != null) {
      conversations.put(c, render(c));
    }
    return builders.render(wave, conversations);
  }
View Full Code Here

      WaveViewImpl<?> wave = WaveViewImpl.create(
          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());
View Full Code Here

    // 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

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

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.