Package org.waveprotocol.box.common.comms.proto

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


  @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

  }

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

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

    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

Related Classes of org.waveprotocol.box.common.comms.proto.DocumentSnapshotProtoImpl

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.