Examples of WaveletName


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

  public static BlipInstaller install(final ProfileManager profileManager,
      final ObservableSupplementedWave supplement, final ParticipantId signedInUser) {
    return new DoodadInstallers.BlipInstaller() {
      @Override
      public void install(Wavelet w, Conversation c, ConversationBlip b, Registries r) {
        WaveletName name = WaveletName.of(w.getWaveId(), w.getId());
        register(r.getElementHandlerRegistry(), name, b, supplement, profileManager,
            signedInUser.getAddress());
      }
    };
  }
View Full Code Here

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

    DeltaSequence deltas = DeltaSequence.of(delta);

    WaveletData wavelet = WaveletDataUtil.createEmptyWavelet(WN1, USER, V0, 1234567890L);
    clientFrontend.waveletUpdate(wavelet, deltas);

    WaveletName dummyWaveletName = ClientFrontendImpl.createDummyWaveletName(INDEX_WAVE_ID);
    verify(listener, Mockito.never()).onUpdate(eq(dummyWaveletName),
        any(CommittedWaveletSnapshot.class),
        isDeltasStartingAt(0),
        any(HashedVersion.class), isNullMarker(), anyString());
  }
View Full Code Here

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

    userPrefs.put("pref1", "value1");
    userPrefs.put("pref2", "value2");
    GadgetMetadata metadata = getTestMetadata(xmlSource);
    WaveId waveId = WaveId.of("wave.google.com", "123");
    WaveletId waveletId = WaveletId.of("wave.google.com", "conv+root");
    WaveletName name = WaveletName.of(waveId, waveletId);
    String securityToken = "SECURITY";
    GadgetWidget gadget = GadgetWidget.createForTesting(
        clientInstanceId, userPrefs, name, securityToken, new FakeLocale());
    int gadgetInstanceId = -12345;
    String url = gadget.buildIframeUrl(gadgetInstanceId, metadata.getIframeUrl(VIEW_NAME));
View Full Code Here

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

              Stacklet stacklet = channels.get(maybeMissing);
              if (stacklet == null) {
                Preconditions.illegalState("Resync wavelet has no stacklet. Channels: "
                    + channels.keySet() + ", resync: " + expectedWavelets.keySet());
              }
              WaveletName wavelet = WaveletName.of(waveId, maybeMissing);
              List<TransformedWaveletDelta> resyncDeltaList = createVersionZeroResync(wavelet);
              HashedVersion v0 = hashFactory.createVersionZero(wavelet);
              stacklet.onWaveletUpdate(resyncDeltaList, v0, v0);
              itr.remove();
            }
View Full Code Here

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

      waveletId = ApiIdSerializer.instance().deserialiseWaveletId(
        OperationUtil.<String>getRequiredParameter(operation, ParamsProperty.WAVELET_ID));
    } catch (InvalidIdException ex) {
      throw new InvalidRequestException("Invalid id", operation, ex);
    }
    WaveletName waveletName = WaveletName.of(waveId, waveletId);
    CommittedWaveletSnapshot snapshot = context.getWaveletSnapshot(waveletName, participant);
    WaveletSnapshot protoSnapshot = SnapshotSerializer.serializeWavelet(snapshot.snapshot, snapshot.snapshot.getHashedVersion());
    WaveletSnapshotProtoImpl protoSnapshotImpl = new WaveletSnapshotProtoImpl(protoSnapshot);
    String jsonSnapshot = gson.toJson(protoSnapshotImpl.toGson(null, gson));
    Map<ParamsProperty, Object> data =
View Full Code Here

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

    // Should return both waves.
    assertEquals(2, results.getNumResults());
  }

  public void testSearchAllReturnsWavesOnlyWithSharedDomainUser() throws Exception {
    WaveletName waveletName =
      WaveletName.of(WaveId.of(DOMAIN, String.valueOf(1)), WAVELET_ID);
    submitDeltaToNewWavelet(waveletName, USER1, addParticipantToWavelet(USER1, waveletName));
    waveletName = WaveletName.of(WaveId.of(DOMAIN, String.valueOf(2)), WAVELET_ID);
    submitDeltaToNewWavelet(waveletName, USER1, addParticipantToWavelet(USER2, waveletName));
View Full Code Here

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

    assertEquals(1, results.getNumResults());
  }

  public void testSearchLimitEnforced() throws Exception {
    for (int i = 0; i < 10; i++) {
      WaveletName name = WaveletName.of(WaveId.of(DOMAIN, "w" + i), WAVELET_ID);
      submitDeltaToNewWavelet(name, USER1, addParticipantToWavelet(USER1, name));
    }

    SearchResult results = searchProvider.search(USER1, "in:inbox", 0, 5);
View Full Code Here

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

    // For this test, we'll create 10 waves with wave ids "0", "1", ... "9" and then run 10
    // searches using offsets 0..9. The waves we get back can be in any order, but we must get
    // all 10 of the waves back exactly once each from the search query.

    for (int i = 0; i < 10; i++) {
      WaveletName name = WaveletName.of(WaveId.of(DOMAIN, String.valueOf(i)), WAVELET_ID);
      submitDeltaToNewWavelet(name, USER1, addParticipantToWavelet(USER1, name));
    }

    // The number of times we see each wave when we search
    int[] saw_wave = new int[10];
View Full Code Here

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

    }
  }

  public void testSearchOrderByAscWorks() throws Exception {
    for (int i = 0; i < 10; i++) {
      WaveletName name = WaveletName.of(WaveId.of(DOMAIN, String.valueOf(i)), WAVELET_ID);
      submitDeltaToNewWavelet(name, USER1, addParticipantToWavelet(USER1, name));
    }
    SearchResult results = searchProvider.search(USER1, "in:inbox orderby:dateasc", 0, 10);
    Ordering<SearchResult.Digest> ascOrdering = Ordering.from(ASCENDING_DATE_COMPARATOR);
    assertTrue(ascOrdering.isOrdered(results.getDigests()));
View Full Code Here

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

    assertTrue(ascOrdering.isOrdered(results.getDigests()));
  }

  public void testSearchOrderByDescWorks() throws Exception {
    for (int i = 0; i < 10; i++) {
      WaveletName name = WaveletName.of(WaveId.of(DOMAIN, String.valueOf(i)), WAVELET_ID);
      submitDeltaToNewWavelet(name, USER1, addParticipantToWavelet(USER1, name));
    }
    SearchResult results = searchProvider.search(USER1, "in:inbox orderby:datedesc", 0, 10);
    Ordering<SearchResult.Digest> descOrdering = Ordering.from(DESCENDING_DATE_COMPARATOR);
    assertTrue(descOrdering.isOrdered(results.getDigests()));
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.