Package org.waveprotocol.box.common.comms

Examples of org.waveprotocol.box.common.comms.DocumentSnapshot


   *
   * @param document The document to serialize
   * @return A snapshot of the given document
   */
  public static DocumentSnapshot serializeDocument(ReadableBlipData document) {
    DocumentSnapshot builder = DocumentSnapshotJsoImpl.create();

    builder.setDocumentId(document.getId());
    builder.setDocumentOperation(WaveletOperationSerializer.serialize(
        document.getContent().asOperation()));

    builder.setAuthor(document.getAuthor().getAddress());
    for (ParticipantId participant : document.getContributors()) {
      builder.addContributor(participant.getAddress());
    }
    builder.setLastModifiedVersion(document.getLastModifiedVersion());
    builder.setLastModifiedTime(document.getLastModifiedTime());

    return builder;
  }
View Full Code Here


   *
   * @param document The document to serialize
   * @return A snapshot of the given document
   */
  public static DocumentSnapshot serializeDocument(ReadableBlipData document) {
    DocumentSnapshot builder = DocumentSnapshotJsoImpl.create();

    builder.setDocumentId(document.getId());
    builder.setDocumentOperation(WaveletOperationSerializer.serialize(
        document.getContent().asOperation()));

    builder.setAuthor(document.getAuthor().getAddress());
    for (ParticipantId participant : document.getContributors()) {
      builder.addContributor(participant.getAddress());
    }
    builder.setLastModifiedVersion(document.getLastModifiedVersion());
    builder.setLastModifiedTime(document.getLastModifiedTime());

    return builder;
  }
View Full Code Here

TOP

Related Classes of org.waveprotocol.box.common.comms.DocumentSnapshot

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.