Examples of Wavelet


Examples of com.google.wave.api.Wavelet

    } catch (PersistenceException e) {
      LOG.log(Level.WARNING, "Cannot fetch account data for robot id: " + getRobotId(), e);
    }
    if (account != null) {
      setupOAuth(account.getId().getAddress(), account.getConsumerSecret(), rpcUrl);
      Wavelet newWelcomeWavelet = newWave(getWaveDomain(), Sets.newHashSet(id.getAddress()));
      if (welcomeWaveId != null) {
        Wavelet templateWelcomeWavelet =
          fetchWavelet(welcomeWaveId, WaveletId.of(getWaveDomain(), "conv+root"), rpcUrl);
        RobotsUtil.copyBlipContents(templateWelcomeWavelet.getRootBlip(),
            newWelcomeWavelet.getRootBlip());
      } else {
        appendLine(newWelcomeWavelet.getRootBlip(), "Welcome to " + getWaveDomain() + "!");
      }
      submit(newWelcomeWavelet, rpcUrl);
View Full Code Here

Examples of com.google.wave.api.Wavelet

    participantsRemoved.add("baz@google.com");

    Blip blip = mock(Blip.class);
   
    when(blip.getBlipId()).thenReturn("blip123");
    Wavelet wavelet = mock(Wavelet.class);
    when(wavelet.getBlip("blip123")).thenReturn(blip);
    Map<String, Blip> blips = Maps.newHashMap();
    blips.put("blip123", blip);
    when(wavelet.getThread(anyString())).thenReturn(new BlipThread("rootThread", -1,
        Lists.<String>newArrayList("blip123"), blips));
   
    EventMessageBundle bundle = new EventMessageBundle("http://10.1.1.1",
        "http://wave-active-api.example.com");
View Full Code Here

Examples of com.google.wave.api.Wavelet

    List<String> contributorsRemoved = new ArrayList<String>();
    contributorsRemoved.add("baz@google.com");

    Blip blip = mock(Blip.class);
    when(blip.getBlipId()).thenReturn("blip123");
    Wavelet wavelet = mock(Wavelet.class);
    when(wavelet.getBlip("blip123")).thenReturn(blip);
    EventMessageBundle bundle = new EventMessageBundle("http://10.1.1.1",
        "http://wave-active-api.example.com");

    BlipContributorsChangedEvent expected = new BlipContributorsChangedEvent(wavelet,
        bundle, "mprasetya@google.com", 1l, "blip123", contributorsAdded, contributorsRemoved);
View Full Code Here

Examples of com.google.wave.api.Wavelet

    oldState.put("key1", "value1");
    oldState.put("key2", "value2");

    Blip blip = mock(Blip.class);
    when(blip.getBlipId()).thenReturn("blip123");
    Wavelet wavelet = mock(Wavelet.class);
    when(wavelet.getBlip("blip123")).thenReturn(blip);
    EventMessageBundle bundle = new EventMessageBundle("http://10.1.1.1",
        "http://wave-active-api.example.com");

    GadgetStateChangedEvent expected = new GadgetStateChangedEvent(wavelet, bundle,
        "mprasetya@google.com", 1l, "blip123", 5, oldState);
View Full Code Here

Examples of com.google.wave.api.Wavelet

    assertEquals(expected.getIndex(), actual.getIndex());
    assertEquals(expected.getOldState(),actual.getOldState());
  }

  public void refactor_testSerializeAndDeserializeOperationErrorEvent() throws Exception {
    Wavelet wavelet = mock(Wavelet.class);
    EventMessageBundle bundle = new EventMessageBundle("http://10.1.1.1",
        "http://wave-active-api.example.com");

    OperationErrorEvent expected = new OperationErrorEvent(wavelet, bundle,
        "foo@google.com", 123l, "op1", "Error!");
View Full Code Here

Examples of com.google.wave.api.Wavelet

    // Deserialize wavelet.
    WaveletData waveletData = context.deserialize(jsonObj.get(WAVELET_TAG), WaveletData.class);
    result.setWaveletData(waveletData);
    Map<String, Blip> blips = new HashMap<String, Blip>();
    Map<String, BlipThread> threads = new HashMap<String, BlipThread>();
    Wavelet wavelet = Wavelet.deserialize(operationQueue, blips, threads, waveletData);
    wavelet.setRobotAddress(robotAddress);
    result.setWavelet(wavelet);

    // Deserialize threads.
    Map<String, BlipThread> tempThreads = context.deserialize(jsonObj.get(THREADS_TAG),
        GsonFactory.THREAD_MAP_TYPE);
View Full Code Here

Examples of com.google.wave.api.Wavelet

   * blip.
   *
   * @param blipToShadow the blip that should be shadowed.
   */
  private void createOrUpdateShadowBlip(Blip blipToShadow) {
    Wavelet wavelet = blipToShadow.getWavelet();
    String blipId = blipToShadow.getBlipId();
    if (shadowBlipMap.containsKey(blipId)) {
      Blip shadowBlip = wavelet.getBlip(shadowBlipMap.get(blipId));
      updateShadowBlip(shadowBlip, blipToShadow);
    } else {
      updateShadowMap(wavelet);

      if (!shadowBlipMap.containsKey(blipId)) {
        createShadowBlip(blipToShadow);
      } else {
        // Update existing shadow Blip
        Blip shadowBlip = wavelet.getBlip(shadowBlipMap.get(blipId));
        updateShadowBlip(shadowBlip, blipToShadow);
      }
    }
  }
View Full Code Here

Examples of com.google.wave.api.Wavelet

    List<String> participantsRemoved = new ArrayList<String>();
    participantsRemoved.add("baz@google.com");

    Blip blip = mock(Blip.class);
    when(blip.getBlipId()).thenReturn("blip123");
    Wavelet wavelet = mock(Wavelet.class);
    when(wavelet.getBlip("blip123")).thenReturn(blip);
    EventMessageBundle bundle = new EventMessageBundle("http://10.1.1.1",
        "http://wave-active-api.example.com");

    WaveletParticipantsChangedEvent expected = new WaveletParticipantsChangedEvent(wavelet,
        bundle, "mprasetya@google.com", 1l, "blip123", participantsAdded, participantsRemoved);
View Full Code Here

Examples of com.google.wave.api.Wavelet

    List<String> contributorsRemoved = new ArrayList<String>();
    contributorsRemoved.add("baz@google.com");

    Blip blip = mock(Blip.class);
    when(blip.getBlipId()).thenReturn("blip123");
    Wavelet wavelet = mock(Wavelet.class);
    when(wavelet.getBlip("blip123")).thenReturn(blip);
    EventMessageBundle bundle = new EventMessageBundle("http://10.1.1.1",
        "http://wave-active-api.example.com");

    BlipContributorsChangedEvent expected = new BlipContributorsChangedEvent(wavelet,
        bundle, "mprasetya@google.com", 1l, "blip123", contributorsAdded, contributorsRemoved);
View Full Code Here

Examples of com.google.wave.api.Wavelet

    oldState.put("key1", "value1");
    oldState.put("key2", "value2");

    Blip blip = mock(Blip.class);
    when(blip.getBlipId()).thenReturn("blip123");
    Wavelet wavelet = mock(Wavelet.class);
    when(wavelet.getBlip("blip123")).thenReturn(blip);
    EventMessageBundle bundle = new EventMessageBundle("http://10.1.1.1",
        "http://wave-active-api.example.com");

    GadgetStateChangedEvent expected = new GadgetStateChangedEvent(wavelet, bundle,
        "mprasetya@google.com", 1l, "blip123", 5, oldState);
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.