Examples of DocumentSnapshotProtoImpl


Examples of org.waveprotocol.box.common.comms.proto.DocumentSnapshotProtoImpl

    for (String field : message.getParticipantId()) {
      addParticipantId(field);
    }
    clearDocument();
    for (DocumentSnapshot field : message.getDocument()) {
      addDocument(new DocumentSnapshotProtoImpl(field));
    }
    setVersion(new ProtocolHashedVersionProtoImpl(message.getVersion()));
    setLastModifiedTime(message.getLastModifiedTime());
    setCreator(message.getCreator());
    setCreationTime(message.getCreationTime());
View Full Code Here

Examples of org.waveprotocol.box.common.comms.proto.DocumentSnapshotProtoImpl

  @Override
  public List<DocumentSnapshotProtoImpl> getDocument() {
    switchToProto();
    List<DocumentSnapshotProtoImpl> list = new ArrayList<DocumentSnapshotProtoImpl>();
    for (int i = 0; i < getDocumentSize(); i++) {
      DocumentSnapshotProtoImpl message = new DocumentSnapshotProtoImpl(proto.getDocument(i));
      list.add(message);
    }
    return list;
  }
View Full Code Here

Examples of org.waveprotocol.box.common.comms.proto.DocumentSnapshotProtoImpl

  }

  @Override
  public DocumentSnapshotProtoImpl getDocument(int n) {
    switchToProto();
    return new DocumentSnapshotProtoImpl(proto.getDocument(n));
  }
View Full Code Here

Examples of org.waveprotocol.box.common.comms.proto.DocumentSnapshotProtoImpl

  /** Get or create a DocumentSnapshotProtoImpl from a DocumentSnapshot. */
  private DocumentSnapshotProtoImpl getOrCreateDocumentSnapshotProtoImpl(DocumentSnapshot message) {
    if (message instanceof DocumentSnapshotProtoImpl) {
      return (DocumentSnapshotProtoImpl) message;
    } else {
      DocumentSnapshotProtoImpl messageImpl = new DocumentSnapshotProtoImpl();
      messageImpl.copyFrom(message);
      return messageImpl;
    }
  }
View Full Code Here

Examples of org.waveprotocol.box.common.comms.proto.DocumentSnapshotProtoImpl

    if (jsonObject.has("3")) {
      JsonElement elem = jsonObject.get("3");
      {
        JsonArray array = elem.getAsJsonArray();
        for (int i = 0; i < array.size(); i++) {
          DocumentSnapshotProtoImpl payload = new DocumentSnapshotProtoImpl();
          GsonUtil.extractJsonObject(payload, array.get(i), gson, raw);
          addDocument(payload);
        }
      }
    }
View Full Code Here

Examples of org.waveprotocol.wave.concurrencycontrol.proto.DocumentSnapshotProtoImpl

    for (String field : message.getParticipant()) {
      addParticipant(field);
    }
    clearDocument();
    for (DocumentSnapshot field : message.getDocument()) {
      addDocument(new DocumentSnapshotProtoImpl(field));
    }
    setVersion(new ProtocolHashedVersionProtoImpl(message.getVersion()));
    setLastModifiedTime(message.getLastModifiedTime());
    setCreator(message.getCreator());
    setCreationTime(message.getCreationTime());
View Full Code Here

Examples of org.waveprotocol.wave.concurrencycontrol.proto.DocumentSnapshotProtoImpl

  @Override
  public List<DocumentSnapshotProtoImpl> getDocument() {
    switchToProto();
    List<DocumentSnapshotProtoImpl> list = new ArrayList<DocumentSnapshotProtoImpl>();
    for (int i = 0; i < getDocumentSize(); i++) {
      DocumentSnapshotProtoImpl message = new DocumentSnapshotProtoImpl(proto.getDocument(i));
      list.add(message);
    }
    return list;
  }
View Full Code Here

Examples of org.waveprotocol.wave.concurrencycontrol.proto.DocumentSnapshotProtoImpl

  }

  @Override
  public DocumentSnapshotProtoImpl getDocument(int n) {
    switchToProto();
    return new DocumentSnapshotProtoImpl(proto.getDocument(n));
  }
View Full Code Here

Examples of org.waveprotocol.wave.concurrencycontrol.proto.DocumentSnapshotProtoImpl

  /** Get or create a DocumentSnapshotProtoImpl from a DocumentSnapshot. */
  private DocumentSnapshotProtoImpl getOrCreateDocumentSnapshotProtoImpl(DocumentSnapshot message) {
    if (message instanceof DocumentSnapshotProtoImpl) {
      return (DocumentSnapshotProtoImpl) message;
    } else {
      DocumentSnapshotProtoImpl messageImpl = new DocumentSnapshotProtoImpl();
      messageImpl.copyFrom(message);
      return messageImpl;
    }
  }
View Full Code Here

Examples of org.waveprotocol.wave.concurrencycontrol.proto.DocumentSnapshotProtoImpl

    if (jsonObject.has("3")) {
      JsonElement elem = jsonObject.get("3");
      {
        JsonArray array = elem.getAsJsonArray();
        for (int i = 0; i < array.size(); i++) {
          DocumentSnapshotProtoImpl payload = new DocumentSnapshotProtoImpl();
          GsonUtil.extractJsonObject(payload, array.get(i), gson, raw);
          addDocument(payload);
        }
      }
    }
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.