Examples of WaveletOperationContext


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

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

  /**
   * Builds a no-op client delta.
   */
  public WaveletDelta makeNoOpDelta(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(new NoOp(context));
    }
    return new WaveletDelta(author, targetVersion, ops);
  }
View Full Code Here

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

    int numOperations = dbOps.size();

    // Code analog to ProtoDeltaStoreDataSerializer.deserialize
    for (int i = 0; i < numOperations; i++) {

      WaveletOperationContext context;
      if (i == numOperations - 1) {
        context = new WaveletOperationContext(author, applicationTimestamp, 1, resultingVersion);
      } else {
        context = new WaveletOperationContext(author, applicationTimestamp, 1);
      }
      operations.add(deserializeWaveletOperation((DBObject) dbOps.get(i), context));
    }

    return new TransformedWaveletDelta(author, resultingVersion, applicationTimestamp,
View Full Code Here

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

      List<CoreWaveletOperation> coreWaveletOperations = pair.op.toCoreWaveletOperations();

      for (int j = 0; j < coreWaveletOperations.size(); ++j) {
        boolean isLast = isLastOfOuter && (j == coreWaveletOperations.size() - 1);
        WaveletOperationContext opContext =
            contextForCreator(pair.creator, versionIncrement, hashedVersion, isLast);
        WaveletOperation waveletOps =
            coreWaveletOpsToWaveletOps(coreWaveletOperations.get(j), opContext);
        ret.add(waveletOps);
      }
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.