Package org.waveprotocol.wave.model.id

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


    searchUi.setTitleText(queryText + " (0-" + resultEnd + " of " + totalStr + ")");
  }

  private void renderDigests() {
    // Preserve selection on re-rendering.
    WaveId toSelect = selected != null ? digestUis.get(selected).getWaveId() : null;
    searchUi.clearDigests();
    digestUis.clear();
    setSelected(null);
    for (int i = 0, size = search.getMinimumTotal(); i < size; i++) {
      Digest digest = search.getDigest(i);
View Full Code Here


  public SimpleWaveStore() {
  }

  @Override
  public void add(WaveContext wave) {
    WaveId id = wave.getWave().getWaveId();
    Preconditions.checkArgument(!waves.containsKey(id));
    waves.put(id, wave);
    fireOnWaveOpened(wave);
  }
View Full Code Here

    fireOnWaveOpened(wave);
  }

  @Override
  public void remove(WaveContext wave) {
    WaveId id = wave.getWave().getWaveId();
    Preconditions.checkArgument(waves.get(id) == wave);
    waves.remove(id);
    fireOnWaveClosed(wave);
  }
View Full Code Here

    // TODO (Yuri Z.) Find a way to obtain an instance of IdGenerator and use it
    // to create udwId.
    WaveletId udwId = buildUserDataWaveletId(participant);
    String waveIdStr = OperationUtil.getRequiredParameter(operation, ParamsProperty.WAVE_ID);
    WaveId waveId = null;
    try {
      waveId = ApiIdSerializer.instance().deserialiseWaveId(waveIdStr);
    } catch (InvalidIdException e) {
      throw new InvalidRequestException("Invalid WAVE_ID parameter: " + waveIdStr, operation, e);
    }
View Full Code Here

  @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

        int msgs = Math.min(5, r.nextInt(20));
        int unread = Math.max(0, r.nextInt(msgs + 5) - 5);
        ParticipantId author = allParticipants.get(r.nextInt(allParticipants.size()));
        List<ParticipantId> participants = randomSubsequence(r, allParticipants);
        participants.remove(author);
        WaveId wid = WaveId.of(domain, "fake" + i);
        double lmt = now - r.nextDouble() * week;
        digests.add(new DigestSnapshot(title, snippet, wid, author, participants, lmt, unread, msgs));
      }
      return digests;
    }
View Full Code Here

TOP

Related Classes of org.waveprotocol.wave.model.id.WaveId

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.