Package com.google.wave.api

Examples of com.google.wave.api.Blip


    participantsAdded.add("bar@google.com");

    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);
    Map<String, Blip> blips = Maps.newHashMap();
    blips.put("blip123", blip);
    when(wavelet.getThread(anyString())).thenReturn(new BlipThread("rootThread", -1,
View Full Code Here


    contributorsAdded.add("bar@google.com");

    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");
View Full Code Here

  public void refactor_testSerializeAndDeserializeGadgetStateChanged() throws Exception {
    Map<String, String> oldState = new HashMap<String, String>();
    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");
View Full Code Here

        + " -help\" on a new line and hit \"Enter\".");
  }

  @Override
  public void onDocumentChanged(DocumentChangedEvent event) {
    Blip blip = event.getBlip();
    String modifiedBy = event.getModifiedBy();
    CommandLine commandLine = null;
    try {
      commandLine = preprocessCommand(blip.getContent());
    } catch (IllegalArgumentException e) {
      appendLine(blip, e.getMessage());
    }
    if (commandLine != null) {
      if (commandLine.hasOption("help")
View Full Code Here

  }

  @Capability(contexts = {Context.SELF, Context.SIBLINGS})
  @Override
  public void onWaveletBlipCreated(WaveletBlipCreatedEvent event) {
    Blip blip = event.getNewBlip();
    if (!isShadowBlip(blip)) {
      createShadowBlip(blip);
    }
  }
View Full Code Here

  }

  @Capability(contexts = {Context.SELF, Context.SIBLINGS})
  @Override
  public void onDocumentChanged(DocumentChangedEvent event) {
    Blip blip = event.getBlip();
    if (!isShadowBlip(blip)) {
      createOrUpdateShadowBlip(blip);
    }
  }
View Full Code Here

  }

  @Capability(contexts = {Context.SELF, Context.SIBLINGS})
  @Override
  public void onAnnotatedTextChanged(AnnotatedTextChangedEvent event) {
    Blip blip = event.getBlip();
    if (!isShadowBlip(blip)) {
      createOrUpdateShadowBlip(blip);
    }
  }
View Full Code Here

   * server will generate it.
   *
   * @param blip the blip to create a new shadow blip for.
   */
  private void createShadowBlip(Blip blip) {
    Blip newBlip = blip.continueThread();
    newBlip.all().replace(blip.getContent());
    newBlip.all().annotate(ECHOEY_ANNOTATION, blip.getBlipId());
  }
View Full Code Here

   */
  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

    participantsAdded.add("bar@google.com");

    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");
View Full Code Here

TOP

Related Classes of com.google.wave.api.Blip

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.