Examples of DigestSnapshot


Examples of org.waveprotocol.box.webclient.search.SearchService.DigestSnapshot

        SearchResponse searchResponse) {
      List<DigestSnapshot> digestSnapshots =
          CollectionUtils.newArrayList();
      int i = 0;
      for (SearchResponse.Digest digest : searchResponse.getDigests()) {
        DigestSnapshot digestSnapshot = deserializeDigest(digest);
        digestSnapshots.add(i, digestSnapshot);
        i++;
      }
      return digestSnapshots;
    }
View Full Code Here

Examples of org.waveprotocol.box.webclient.search.SearchService.DigestSnapshot

    private static DigestSnapshot deserializeDigest(Digest digest) {
      List<ParticipantId> participantIds = CollectionUtils.newArrayList();
      for (String participant : digest.getParticipants()) {
        participantIds.add(ParticipantId.ofUnsafe(participant));
      }
      DigestSnapshot digestSnapshot =
          new DigestSnapshot(digest.getTitle(), digest.getSnippet(), WaveId.deserialise(digest
              .getWaveId()), ParticipantId.ofUnsafe(digest.getAuthor()), participantIds,
              digest.getLastModified(), digest.getUnreadCount(), digest.getBlipCount());
      return digestSnapshot;
    }
View Full Code Here

Examples of org.waveprotocol.box.webclient.search.SearchService.DigestSnapshot

      // incremental, a brute force re-rendering here is a stop-gap.

      // Remove all digests.  Remove from last to first, so that remove is O(1).
      log.trace().log("handling changed search");
      for (int i = results.size() - 1; i >= 0; i--) {
        DigestSnapshot oldSnapshot = results.get(i);
        DigestProxy oldDigest = getDigest(i);
        results.remove(i);
        digests.remove(ModernIdSerialiser.INSTANCE.serialiseWaveId(oldDigest.getWaveId()));
        oldDigest.destroy();
      }
View Full Code Here

Examples of org.waveprotocol.box.webclient.search.SearchService.DigestSnapshot

  }

  @Override
  public DigestProxy getDigest(int index) {
    Preconditions.checkState(outstanding == null);
    DigestSnapshot result = results.get(index);
    WaveId waveId = result.getWaveId();
    String id = ModernIdSerialiser.INSTANCE.serialiseWaveId(waveId);
    DigestProxy proxy = digests.get(id);
    if (proxy == null) {
      proxy = new DigestProxy(result);
      digests.put(id, proxy);
View Full Code Here

Examples of org.waveprotocol.box.webclient.search.SearchService.DigestSnapshot

     * cause any change to the digest state, and so does not fire a change event.
     */
    void deactivate() {
      Preconditions.checkState(dynamicDigest != null);
      staticDigest =
          new DigestSnapshot(getTitle(), getSnippet(), getWaveId(), getAuthor(),
              getParticipantsSnippet(), getLastModifiedTime(), getUnreadCount(), getBlipCount());
      dynamicDigest.destroy();
      dynamicDigest = null;
    }
View Full Code Here

Examples of org.waveprotocol.box.webclient.search.SearchService.DigestSnapshot

        SearchResponse searchResponse) {
      List<DigestSnapshot> digestSnapshots =
          CollectionUtils.newArrayList();
      int i = 0;
      for (SearchResponse.Digest digest : searchResponse.getDigests()) {
        DigestSnapshot digestSnapshot = deserializeDigest(digest);
        digestSnapshots.add(i, digestSnapshot);
        i++;
      }
      return digestSnapshots;
    }
View Full Code Here

Examples of org.waveprotocol.box.webclient.search.SearchService.DigestSnapshot

    private static DigestSnapshot deserializeDigest(Digest digest) {
      List<ParticipantId> participantIds = CollectionUtils.newArrayList();
      for (String participant : digest.getParticipants()) {
        participantIds.add(ParticipantId.ofUnsafe(participant));
      }
      DigestSnapshot digestSnapshot =
          new DigestSnapshot(digest.getTitle(), digest.getSnippet(), WaveId.deserialise(digest
              .getWaveId()), ParticipantId.ofUnsafe(digest.getAuthor()), participantIds,
              digest.getLastModified(), digest.getUnreadCount(), digest.getBlipCount());
      return digestSnapshot;
    }
View Full Code Here

Examples of org.waveprotocol.box.webclient.search.SearchService.DigestSnapshot

      // incremental, a brute force re-rendering here is a stop-gap.

      // Remove all digests.  Remove from last to first, so that remove is O(1).
      log.trace().log("handling changed search");
      for (int i = results.size() - 1; i >= 0; i--) {
        DigestSnapshot oldSnapshot = results.get(i);
        DigestProxy oldDigest = getDigest(i);
        results.remove(i);
        digests.remove(ModernIdSerialiser.INSTANCE.serialiseWaveId(oldDigest.getWaveId()));
        fireOnDigestRemoved(i, oldDigest);
        oldDigest.destroy();
View Full Code Here

Examples of org.waveprotocol.box.webclient.search.SearchService.DigestSnapshot

  }

  @Override
  public DigestProxy getDigest(int index) {
    Preconditions.checkState(outstanding == null);
    DigestSnapshot result = results.get(index);
    WaveId waveId = result.getWaveId();
    String id = ModernIdSerialiser.INSTANCE.serialiseWaveId(waveId);
    DigestProxy proxy = digests.get(id);
    if (proxy == null) {
      proxy = new DigestProxy(result);
      digests.put(id, proxy);
View Full Code Here

Examples of org.waveprotocol.box.webclient.search.SearchService.DigestSnapshot

     * cause any change to the digest state, and so does not fire a change event.
     */
    void deactivate() {
      Preconditions.checkState(dynamicDigest != null);
      staticDigest =
          new DigestSnapshot(getTitle(), getSnippet(), getWaveId(), getAuthor(),
              getParticipantsSnippet(), getLastModifiedTime(), getUnreadCount(), getBlipCount());
      dynamicDigest.destroy();
      dynamicDigest = 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.