Package com.google.wave.api.event

Examples of com.google.wave.api.event.DocumentChangedEvent


    EventMessageBundle messages = generateAndCheckEvents(EventType.DOCUMENT_CHANGED);
    assertEquals("Expected one event", 1, messages.getEvents().size());
    // Can not check the blip id because it is not accessible, however the line
    // here below will confirm that there was actually a real
    // DocumentChangedEvent put into the message bundle.
    DocumentChangedEvent event = DocumentChangedEvent.as(messages.getEvents().get(0));
    assertEquals(ALEX.getAddress(), event.getModifiedBy());
  }
View Full Code Here


  }

  @SuppressWarnings("unchecked")
  public void testProcessSendsBundleAndCallsOperationsApplicator() throws Exception {
    EventMessageBundle messages = new EventMessageBundle(ROBOT_NAME.toEmailAddress(), "");
    messages.addEvent(new DocumentChangedEvent(null, null, ALEX.getAddress(), 0L, "b+1234"));
    when(eventGenerator.generateEvents(
        any(WaveletAndDeltas.class), anyMap(), any(EventDataConverter.class))).thenReturn(messages);

    OperationRequest op = new OperationRequest("wavelet.fetch", "op1");
    List<OperationRequest> ops = Collections.singletonList(op);
View Full Code Here

    WaveletData waveletData = new WaveletData("google.com!wave1", "google.com!conv+root", "blip1",
        null);
    waveletData.addParticipant("foo@google.com");
    BlipSubmittedEvent event1 = new BlipSubmittedEvent(null, null, "foo@test.com", 1l, "blip1");
    DocumentChangedEvent event2 = new DocumentChangedEvent(null, null, "foo@test.com", 1l, "blip1");
    WaveletTagsChangedEvent event3 = new WaveletTagsChangedEvent(null, null, "foo@test.com", 1l,
        "blip1");

    EventMessageBundle bundle = new EventMessageBundle("Foo", "http://gmodules.com/api/rpc");
    bundle.addEvent(event1);
View Full Code Here

            addEvent(apiEvent, capabilities, blip.getId(), messages);
          }
        } else {
          if (capabilities.containsKey(EventType.DOCUMENT_CHANGED)
              && !documentChangedEventGenerated) {
            DocumentChangedEvent apiEvent = new DocumentChangedEvent(
                null, null, deltaAuthor.getAddress(), deltaTimestamp, blip.getId());
            addEvent(apiEvent, capabilities, blip.getId(), messages);
            // Only one documentChangedEvent should be generated per bundle.
            documentChangedEventGenerated = true;
          }
View Full Code Here

    };

    WaveletData waveletData = new WaveletData("google.com!wave1", "google.com!conv+root", "blip1",
        Arrays.asList("foo@google.com"));
    BlipSubmittedEvent event1 = new BlipSubmittedEvent(null, null, "foo@test.com", 1l, "blip1");
    DocumentChangedEvent event2 = new DocumentChangedEvent(null, null, "foo@test.com", 1l, "blip1");
    WaveletTagsChangedEvent event3 = new WaveletTagsChangedEvent(null, null, "foo@test.com", 1l,
        "blip1");

    EventMessageBundle bundle = new EventMessageBundle("Foo", "http://gmodules.com/api/rpc");
    bundle.addEvent(event1);
View Full Code Here

            addEvent(apiEvent, capabilities, blip.getId(), messages);
          }
        } else {
          if (capabilities.containsKey(EventType.DOCUMENT_CHANGED)
              && !documentChangedEventGenerated) {
            DocumentChangedEvent apiEvent = new DocumentChangedEvent(
                null, null, deltaAuthor.getAddress(), deltaTimestamp, blip.getId());
            addEvent(apiEvent, capabilities, blip.getId(), messages);
            // Only one documentChangedEvent should be generated per bundle.
            documentChangedEventGenerated = true;
          }
View Full Code Here

TOP

Related Classes of com.google.wave.api.event.DocumentChangedEvent

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.