Examples of WaveId


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

    // It's possible that the callback happens synchronously, so put in
    // a fake request id and detect it's removal later.
    debugLastSubmit.put(waveletId, SUBMITTING);

    final String channelId = this.channelId;
    final WaveId waveId = this.waveId;

    String requestId = waveService.viewSubmit(WaveletName.of(waveId, waveletId),
        delta, channelId, new WaveViewService.SubmitCallback() {
      @Override
      public void onSuccess(HashedVersion version, int opsApplied, String errorMessage,
View Full Code Here

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

  @Override
  public OpBasedWavelet openWavelet(OperationRequest operation, ParticipantId participant)
      throws InvalidRequestException {
    try {
      WaveId waveId = ApiIdSerializer.instance().deserialiseWaveId(
          OperationUtil.<String>getRequiredParameter(operation, ParamsProperty.WAVE_ID));
      WaveletId waveletId = ApiIdSerializer.instance().deserialiseWaveletId(
          OperationUtil.<String>getRequiredParameter(operation, ParamsProperty.WAVELET_ID));
      return openWavelet(waveId, waveletId, participant);
    } catch (InvalidIdException e) {
View Full Code Here

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

  @Override
  public ObservableConversationView openConversation(
      OperationRequest operation, ParticipantId participant) throws InvalidRequestException {
    try {
      WaveId waveId = ApiIdSerializer.instance().deserialiseWaveId(
          OperationUtil.<String>getRequiredParameter(operation, ParamsProperty.WAVE_ID));
      WaveletId waveletId = ApiIdSerializer.instance().deserialiseWaveletId(
          OperationUtil.<String>getRequiredParameter(operation, ParamsProperty.WAVELET_ID));
      return openConversation(waveId, waveletId, participant);
    } catch (InvalidIdException e) {
View Full Code Here

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

  @Override
  public ImmutableSet<WaveletId> getVisibleWaveletIds(OperationRequest operation, ParticipantId participant)
      throws InvalidRequestException {
    Set<WaveletId> waveletIds = new HashSet<WaveletId>();
    try {
      WaveId waveId = ApiIdSerializer.instance().deserialiseWaveId(
          OperationUtil.<String>getRequiredParameter(operation, ParamsProperty.WAVE_ID));
      ImmutableSet<WaveletId> ids = waveletProvider.getWaveletIds(waveId);
      for (WaveletId waveletId: ids) {
        WaveletName waveletName = WaveletName.of(waveId, waveletId);
        if (waveletProvider.checkAccessPermission(waveletName, participant)) {
View Full Code Here

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

  }

  @Override
  public void execute(final OperationRequest operation, final OperationContext context, ParticipantId participant)
      throws InvalidRequestException {
    WaveId waveId;
    WaveletId waveletId;
    HashedVersion startVersion;
    HashedVersion endVersion;
    try {
      waveId = ApiIdSerializer.instance().deserialiseWaveId(
View Full Code Here

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

    // TODO (Yuri Z.) Find a way to obtain an instance of IdGenerator and use it
    // to create udwId.
    WaveletId udwId = IdUtil.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

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

    wavelet.close();

    ExceptionalIterator<WaveId, PersistenceException> iterator = store.getWaveIdIterator();
    assertTrue(iterator.hasNext());

    WaveId waveId1 = iterator.next();
    assertTrue(iterator.hasNext());

    WaveId waveId2 = iterator.next();

    // This is necessary because the order of waveIds is implementation specific.
    if (WAVE1_WAVELET1.waveId.equals(waveId1)) {
      assertEquals(WAVE2_WAVELET1.waveId, waveId2);
    } else {
View Full Code Here

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

    verifyServletReturnsForbiddenForWaveref(waveref);
  }

  public void testGetMissingDataReturnsForbidden() throws Exception {
    WaveletData wavelet = waveletProvider.getHostedWavelet();
    WaveId waveId = wavelet.getWaveId();
    WaveletId waveletId = wavelet.getWaveletId();

    WaveRef unknownWave = WaveRef.of(WaveId.of(waveId.getDomain(), waveId.getId() + "junk"));
    verifyServletReturnsForbiddenForWaveref(unknownWave);
    WaveRef unknownWavelet = WaveRef.of(waveId, WaveletId.of(waveletId.getDomain(), waveletId.getId() + "junk"));
    verifyServletReturnsForbiddenForWaveref(unknownWavelet);
    WaveRef unknownDocument = WaveRef.of(waveId, waveletId, "madeupdocid");
    verifyServletReturnsForbiddenForWaveref(unknownDocument);
View Full Code Here

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

   * encodeToUriPathSegment is called with a waveRef input, and checks that the
   * resulting path has the correct format of
   * waveDomain/waveId[/~/waveletId/[documentId]]
   */
  public void testPathEncodeGetsCalledWithWaveRefInput() {
    WaveId waveId = WaveId.of("www.example.com", "abcdEFGH");
    WaveletId waveletId = WaveletId.of("www.example.com", "conv+root");
    String documentId = "b+1234";

    WaveRef waveIdOnly = WaveRef.of(waveId);
    WaveRef waveIdPlusWaveletId = WaveRef.of(waveId, waveletId);
View Full Code Here

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

   * encodeToUriPathSegment is called with a waveRef input, and checks that the
   * resulting path has the correct format of
   * waveDomain/waveId[/~/waveletId/[documentId]]
   */
  public void testQueryEncodeGetsCalledWithWaveRefInput() {
    WaveId waveId = WaveId.of("www.example.com", "abcdEFGH");
    WaveletId waveletId = WaveletId.of("www.example.com", "conv+root");
    String documentId = "b+1234";

    WaveRef waveIdOnly = WaveRef.of(waveId);
    WaveRef waveIdPlusWaveletId = WaveRef.of(waveId, waveletId);
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.