Examples of WaveletOperationContext


Examples of org.waveprotocol.wave.model.operation.wave.WaveletOperationContext

    return ops;
  }

  public static List<WaveletOperation> userDataWaveletOps(ParticipantId user, long creationTime) {
    return Collections.<WaveletOperation>singletonList(
        new AddParticipant(new WaveletOperationContext(user, creationTime, 0L), user));
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.operation.wave.WaveletOperationContext

                    "Unexpected timestamp: %s in delta %s", badOp, delta);
                // TODO(ohler): Rename
                // CoreWaveletOperationSerializer.deserialize() to
                // deserializeWithNoTimestamp() or something.
                WaveletOperation withTimestamp = WaveletOperation.cloneOp(badOp,
                    new WaveletOperationContext(badOp.getContext().getCreator(),
                        rawDelta.getApplicationTimestamp(),
                        badOp.getContext().getVersionIncrement()));
                WaveletOperation converted =
                    converter.convertAndApply(convertGooglewaveToGmail(withTimestamp));
                //log.info(version + ": " + op + " -> " + converted);
View Full Code Here

Examples of org.waveprotocol.wave.model.operation.wave.WaveletOperationContext

    }

    ArrayList<DocOp> docOps = CollectionUtils.newArrayList();
    List<WaveletOperation> oldOperations = CollectionUtils.newArrayList(this);
    String currentId = null;
    WaveletOperationContext lastOperationContext = null;
    this.clear();

    for (WaveletOperation waveletOp : oldOperations) {
      if (waveletOp instanceof WaveletBlipOperation) {
        WaveletBlipOperation waveletBlipOp = ((WaveletBlipOperation) waveletOp);
View Full Code Here

Examples of org.waveprotocol.wave.model.operation.wave.WaveletOperationContext

        .retain(posStart)
        .deleteCharacters(characters)
        .retain(remaining)
        .build();
    BlipContentOperation blipOp = new BlipContentOperation(
        new WaveletOperationContext(author, 0L, 1), op);
    WaveletBlipOperation waveOp = new WaveletBlipOperation("blip id", blipOp);
    return waveOp;
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.operation.wave.WaveletOperationContext

    return makeTransformedDelta(0L, HashedVersion.unsigned(initialVersion + 1), 1);
  }

  /** Create a NoOp operation. */
  public NoOp noOp() {
    return new NoOp(new WaveletOperationContext(author, 0L, 1L));
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.operation.wave.WaveletOperationContext

    return new NoOp(new WaveletOperationContext(author, 0L, 1L));
  }

  /** Create an AddParticipant operation. */
  public AddParticipant addParticipant(ParticipantId participant) {
    return new AddParticipant(new WaveletOperationContext(author, 0L, 1L), participant);
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.operation.wave.WaveletOperationContext

    return new AddParticipant(new WaveletOperationContext(author, 0L, 1L), participant);
  }

  /** Creates a RemoveParticipant operation. */
  public RemoveParticipant removeParticipant(ParticipantId participant) {
    return new RemoveParticipant(new WaveletOperationContext(author, 0L, 1L), participant);
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.operation.wave.WaveletOperationContext

  /**
   * A docop that is empty. i.e. does nothing to the document. The document must
   * also be empty, otherwise the operation is invalid.
   */
  public WaveletOperation noOpDocOp(String blipId) {
    WaveletOperationContext context = new WaveletOperationContext(author, 0L, 1L);
    BlipContentOperation blipOp = new BlipContentOperation(context, (new DocOpBuilder()).build());
    return new WaveletBlipOperation(blipId, blipOp);
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.operation.wave.WaveletOperationContext

    builder.retain(pos).characters(text);
    if (remaining > 0) {
      builder.retain(remaining);
    }
    BlipContentOperation blipOp = new BlipContentOperation(
        new WaveletOperationContext(author, 0L, 1, resultingVersion), builder.build());
    WaveletBlipOperation waveOp = new WaveletBlipOperation("blip id", blipOp);
    return waveOp;
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.operation.wave.WaveletOperationContext

  /**
   * Builds a random client delta.
   */
  public WaveletDelta makeDelta(HashedVersion targetVersion, long timestamp, int numOps) {
    List<WaveletOperation> ops = CollectionUtils.newArrayList();
    WaveletOperationContext context =
        new WaveletOperationContext(author, Constants.NO_TIMESTAMP, 1);
    for (int i = 0; i < numOps; ++i) {
      ops.add(randomOp(context));
    }
    return new WaveletDelta(author, targetVersion, ops);
  }
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.