Examples of WaveletId


Examples of org.waveprotocol.wave.model.id.WaveletId

    try {
      TopDocs hints = indexSearcher.search(participantQuery, MAX_WAVES, LMT_ASC_SORT);
      for (ScoreDoc hint : hints.scoreDocs) {
        Document document = indexSearcher.doc(hint.doc);
        WaveId waveId = WaveId.deserialise(document.get(WAVEID.toString()));
        WaveletId waveletId = WaveletId.deserialise(document.get(WAVELETID.toString()));
        userWavesViewMap.put(waveId, waveletId);
      }
    } catch (IOException e) {
      LOG.log(Level.WARNING, "Search failed: " + user, e);
    } finally {
View Full Code Here

Examples of org.waveprotocol.wave.model.id.WaveletId

                // in the waves store.
                Map<WaveId, Wave> waves = waveMap.getWaves();
                for (Map.Entry<WaveId, Wave> entry : waves.entrySet()) {
                  Wave wave = entry.getValue();
                  for (WaveletContainer c : wave) {
                    WaveletId waveletId = c.getWaveletName().waveletId;
                    try {
                      if (!c.hasParticipant(user)) {
                        continue;
                      }
                      // Add this wave to the user view.
View Full Code Here

Examples of org.waveprotocol.wave.model.id.WaveletId

      InvalidIdException {
    ObservableWaveletData.Factory<? extends ObservableWaveletData> factory
        = WaveletDataImpl.Factory.create(docFactory);

    ParticipantId author = ParticipantId.of(snapshot.getCreator());
    WaveletId waveletId =
        ModernIdSerialiser.INSTANCE.deserialiseWaveletId(snapshot.getWaveletId());
    long creationTime = snapshot.getCreationTime();

    ObservableWaveletData wavelet = factory.create(new EmptyWaveletSnapshot(waveId, waveletId,
            author, WaveletOperationSerializer.deserialize(snapshot.getVersion()),
View Full Code Here

Examples of org.waveprotocol.wave.model.id.WaveletId

   * Ensures that each wave in the current waves view has the user data wavelet by always adding
   *  it to the view.
   */
  protected void ensureWavesHaveUserDataWavelet(
      LinkedHashMultimap<WaveId, WaveletId> currentUserWavesView, ParticipantId user) {
    WaveletId udw =
        WaveletId.of(user.getDomain(),
            IdUtil.join(IdConstants.USER_DATA_WAVELET_PREFIX, user.getAddress()));
    Set<WaveId> waveIds = currentUserWavesView.keySet();
    for (WaveId waveId : waveIds) {
      Set<WaveletId> waveletIds = currentUserWavesView.get(waveId);
View Full Code Here

Examples of org.waveprotocol.wave.model.id.WaveletId

    Iterator<JsonElement> docJsonIterator = docsJson.iterator();
    while (docJsonIterator.hasNext()) {
      JsonObject docJson = docJsonIterator.next().getAsJsonObject();

      WaveId waveId = WaveId.deserialise(docJson.getAsJsonPrimitive(WAVE_ID).getAsString());
      WaveletId waveletId =
          WaveletId.deserialise(docJson.getAsJsonPrimitive(WAVELET_ID).getAsString());
      currentUserWavesView.put(waveId, waveletId);
    }
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.id.WaveletId

    // waves, and requires raw wavelet access for snippeting.
    ObservableWaveletData root = null;
    ObservableWaveletData other = null;
    ObservableWaveletData udw = null;
    for (ObservableWaveletData waveletData : wave.getWavelets()) {
      WaveletId waveletId = waveletData.getWaveletId();
      if (IdUtil.isConversationRootWaveletId(waveletId)) {
        root = waveletData;
      } else if (IdUtil.isConversationalId(waveletId)) {
        other = waveletData;
      } else if (IdUtil.isUserDataWavelet(waveletId)
View Full Code Here

Examples of org.waveprotocol.wave.model.id.WaveletId

  private void renderSnapshot(WaveRef waveref, ParticipantId requester, HttpServletResponse dest)
      throws IOException {
    // TODO(josephg): Its currently impossible to fetch all wavelets inside a
    // wave that are visible to the user. Until this is fixed, if no wavelet is
    // specified we'll just return the conv+root.
    WaveletId waveletId = waveref.hasWaveletId() ? waveref.getWaveletId() : WaveletId.of(
        waveref.getWaveId().getDomain(), "conv+root");

    WaveletName waveletName = WaveletName.of(waveref.getWaveId(), waveletId);

    CommittedWaveletSnapshot committedSnapshot;
View Full Code Here

Examples of org.waveprotocol.wave.model.id.WaveletId

  private static final CopyOnWriteArraySet<PerUserWaveViewBus.Listener> listeners =
      new CopyOnWriteArraySet<PerUserWaveViewBus.Listener>();

  @Override
  public void waveletUpdate(ReadableWaveletData wavelet, DeltaSequence deltas) {
    WaveletId waveletId = wavelet.getWaveletId();
    WaveId waveId = wavelet.getWaveId();
    WaveletName waveletName = WaveletName.of(waveId, waveletId);
    if(LOG.isInfoLoggable()) {
      LOG.info("Got update for " + waveId + " " + waveletId);
    }
View Full Code Here

Examples of org.waveprotocol.wave.model.id.WaveletId

    return wavelets.get(waveletId);
  }

  @Override
  public void addWavelet(ObservableWaveletData wavelet) {
    WaveletId waveletId = wavelet.getWaveletId();
    Preconditions.checkArgument(
        !wavelets.containsKey(waveletId), "Duplicate wavelet id: %s", waveletId);
    wavelets.put(waveletId, wavelet);
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.id.WaveletId

      l.onParticipantRemoved(participant);
    }
  }

  private void triggerOnAnchorChanged(AnchorData oldMAnchor, AnchorData newMAnchor) {
    WaveletId oldWaveletId = maybeMakeWaveletId(oldMAnchor.getConversationId());
    WaveletId newWaveletId = maybeMakeWaveletId(newMAnchor.getConversationId());
    Anchor oldAnchor = maybeMakeAnchor(oldWaveletId, oldMAnchor.getBlipId());
    Anchor newAnchor = maybeMakeAnchor(newWaveletId, newMAnchor.getBlipId());
    triggerOnAnchorChanged(oldAnchor, newAnchor);
  }
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.