Examples of ObservablePluggableMutableDocument


Examples of org.waveprotocol.wave.model.wave.data.impl.ObservablePluggableMutableDocument

  private static final String VALUE_ATTR = "value";

  /** Creates an empty ObservableBasicSetImpl to work with. */
  @Override
  protected void createEmptyMap() {
    ObservablePluggableMutableDocument doc = BasicFactories.observableDocumentProvider().create(
        "data", Collections.<String, String> emptyMap());

    set = DocumentBasedBasicSet.create(
        DefaultDocumentEventRouter.create(doc), doc.getDocumentElement(), Serializer.STRING,
        ENTRY_TAG, VALUE_ATTR);
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.wave.data.impl.ObservablePluggableMutableDocument

  private static final String KEY_ATTR = "blipId";
  private static final String VALUE_ATTR = "version";

  @Override
  protected void createMap() {
    ObservablePluggableMutableDocument doc = BasicFactories.observableDocumentProvider().create(
        "data", Collections.<String, String> emptyMap());

    map = DocumentBasedBasicMap.create(DefaultDocumentEventRouter.create(doc),
        doc.getDocumentElement(), Serializer.STRING, Serializer.INTEGER, ENTRY_TAG,
        KEY_ATTR, VALUE_ATTR);
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.wave.data.impl.ObservablePluggableMutableDocument

    states.setGadgetState(GADGET2, "key1", null);
    verify(listener).onGadgetStateChanged(GADGET2, "key1", "value1 in 2", null);
  }

  private void setupDoc() {
    ObservablePluggableMutableDocument doc =
        new ObservablePluggableMutableDocument(
            DocumentSchema.NO_SCHEMA_CONSTRAINTS, DocProviders.POJO.parse("").asOperation());
    doc.init(SilentOperationSink.VOID);
    listener = mock(Listener.class);
    states = GadgetStateCollection.create(DefaultDocumentEventRouter.create(doc),
        doc.getDocumentElement(), listener);
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.wave.data.impl.ObservablePluggableMutableDocument

   */
  public static ObservableDocument createDocument(DocumentSchema schema,
      String initialContent, SilentOperationSink<? super DocOp> sink) {
    Preconditions.checkNotNull(sink, "Sink can't be null");
    DocInitialization init = DocProviders.POJO.parse(initialContent).asOperation();
    ObservablePluggableMutableDocument doc = new ObservablePluggableMutableDocument(schema, init);
    doc.init(sink);
    return doc;
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.wave.data.impl.ObservablePluggableMutableDocument

  }

  @Override
  public DocumentOperationSink create(WaveletId waveletId, String docId,
      DocInitialization content) {
    ObservablePluggableMutableDocument doc = factory.create(waveletId, docId, content);
    doc.init(SilentOperationSink.VOID);
    return doc;
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.wave.data.impl.ObservablePluggableMutableDocument

    this.serializer = new WaveSerializer(
        new ServerMessageSerializer(), new DocumentFactory<ObservablePluggableMutableDocument>() {
          @Override
          public ObservablePluggableMutableDocument create(
              WaveletId waveletId, String docId, DocInitialization content) {
            return new ObservablePluggableMutableDocument(
                DocumentSchema.NO_SCHEMA_CONSTRAINTS, content);
          }
        });
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.wave.data.impl.ObservablePluggableMutableDocument

    this.enableDiffOnOpen = enableDiffOnOpen;
    serializer = new WaveSerializer(new ServerMessageSerializer(),
        new DocumentFactory<ObservablePluggableMutableDocument>() {
      @Override public ObservablePluggableMutableDocument create(
          WaveletId waveletId, String docId, DocInitialization content) {
        return new ObservablePluggableMutableDocument(
            DocumentSchema.NO_SCHEMA_CONSTRAINTS, content);
      }
    });
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.wave.data.impl.ObservablePluggableMutableDocument

  }

  @Override
  public DocumentOperationSink create(WaveletId waveletId, String docId,
      DocInitialization content) {
    ObservablePluggableMutableDocument doc = factory.create(waveletId, docId, content);
    doc.init(SilentOperationSink.VOID);
    return doc;
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.wave.data.impl.ObservablePluggableMutableDocument

   */
  public static ObservableDocument createDocument(DocumentSchema schema,
      String initialContent, SilentOperationSink<? super DocOp> sink) {
    Preconditions.checkNotNull(sink, "Sink can't be null");
    DocInitialization init = DocProviders.POJO.parse(initialContent).asOperation();
    ObservablePluggableMutableDocument doc = new ObservablePluggableMutableDocument(schema, init);
    doc.init(sink);
    return doc;
  }
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.