Examples of EmptyWaveletSnapshot


Examples of org.waveprotocol.wave.model.wave.data.impl.EmptyWaveletSnapshot

    ParticipantId author = ParticipantId.of(snapshot.getCreator());
    WaveletId waveletId = ModernIdSerialiser.INSTANCE.deserialiseWaveletId(snapshot.getWaveletId());
    long creationTime = snapshot.getCreationTime();

    ObservableWaveletData wavelet = factory.create(new EmptyWaveletSnapshot(waveId, waveletId,
        author, CoreWaveletOperationSerializer.deserialize(snapshot.getVersion()), creationTime));

    for (String participant : snapshot.getParticipantIdList()) {
      wavelet.addParticipant(getParticipantId(participant));
    }
View Full Code Here

Examples of org.waveprotocol.wave.model.wave.data.impl.EmptyWaveletSnapshot

   * @param author the author of the wavelet.
   * @param creationTimestamp the time at which the wavelet is created.
   */
  public static ObservableWaveletData createEmptyWavelet(WaveletName waveletName,
      ParticipantId author, HashedVersion version, long creationTimestamp) {
    return copyWavelet(new EmptyWaveletSnapshot(waveletName.waveId, waveletName.waveletId, author,
        version, creationTimestamp));
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.wave.data.impl.EmptyWaveletSnapshot

    // Create the new channel, and fake an initial snapshot.
    // TODO(anorth): inject a clock for providing timestamps.
    HashedVersion v0 = hashFactory.createVersionZero(WaveletName.of(waveId, waveletId));
    final ObservableWaveletData emptySnapshot =
        dataFactory.create(
            new EmptyWaveletSnapshot(waveId, waveletId, creator, v0, System.currentTimeMillis()));

    try {
      boolean dropAdditionalSnapshot = true;
      addOperationChannel(waveletId, emptySnapshot, v0, Accessibility.READ_WRITE,
          dropAdditionalSnapshot);
View Full Code Here

Examples of org.waveprotocol.wave.model.wave.data.impl.EmptyWaveletSnapshot

  }

  public FakeWaveViewServiceUpdate setWaveletSnapshot(WaveId waveId, ParticipantId creator,
      long creationTime, final HashedVersion hashedVersion) {
    assert hasWaveletId();
    waveletSnapshot = dataFactory.create(new EmptyWaveletSnapshot(waveId, waveletId, creator,
        hashedVersion, creationTime));
    return this;
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.wave.data.impl.EmptyWaveletSnapshot

    return new WaveletDataFactory<T>(factory);
  }

  @Override
  public T create() {
    return factory.create(new EmptyWaveletSnapshot(WAVE_ID, WAVELET_ID, PARTICIPANT_ID,
        HashedVersion.unsigned(0), 0));
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.wave.data.impl.EmptyWaveletSnapshot

   * @param author the author of the wavelet.
   * @param creationTimestamp the time at which the wavelet is created.
   */
  public static ObservableWaveletData createEmptyWavelet(WaveletName waveletName,
      ParticipantId author, HashedVersion version, long creationTimestamp) {
    return copyWavelet(new EmptyWaveletSnapshot(waveletName.waveId, waveletName.waveletId, author,
        version, creationTimestamp));
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.wave.data.impl.EmptyWaveletSnapshot

    ParticipantId author = ParticipantId.of(snapshot.getCreator());
    WaveletId waveletId = ModernIdSerialiser.INSTANCE.deserialiseWaveletId(snapshot.getWaveletId());
    long creationTime = snapshot.getCreationTime();

    ObservableWaveletData wavelet = factory.create(new EmptyWaveletSnapshot(waveId, waveletId,
        author, CoreWaveletOperationSerializer.deserialize(snapshot.getVersion()), creationTime));

    for (String participant : snapshot.getParticipantIdList()) {
      wavelet.addParticipant(getParticipantId(participant));
    }
View Full Code Here

Examples of org.waveprotocol.wave.model.wave.data.impl.EmptyWaveletSnapshot

    ParticipantId author = ParticipantId.of(snapshot.getCreator());
    WaveletId waveletId =
        ModernIdSerialiser.INSTANCE.deserialiseWaveletId(snapshot.getWaveletId());
    long creationTime = snapshot.getCreationTime();

    ObservableWaveletData wavelet = factory.create(new EmptyWaveletSnapshot(waveId, waveletId,
            author, WaveletOperationSerializer.deserialize(snapshot.getVersion()),
            creationTime));

    for (String participant : snapshot.getParticipantId()) {
      wavelet.addParticipant(ParticipantId.of(participant));
View Full Code Here

Examples of org.waveprotocol.wave.model.wave.data.impl.EmptyWaveletSnapshot

  @Override
  public OpBasedWavelet create(WaveId waveId, WaveletId waveletId, ParticipantId creator) {
    long now = System.currentTimeMillis();
    HashedVersion v0 = HashedVersion.unsigned(0);
    ObservableWaveletData waveData = holderFactory
        .create(new EmptyWaveletSnapshot(waveId, waveletId, creator, v0, now));
    lastContextFactory = new MockWaveletOperationContextFactory().setParticipantId(author);
    lastAuthoriser = new MockParticipationHelper();
    SilentOperationSink<WaveletOperation> executor =
        Executor.<WaveletOperation, WaveletData>build(waveData);
    SilentOperationSink<WaveletOperation> out = new VersionIncrementingSink(waveData, sink);
View Full Code Here

Examples of org.waveprotocol.wave.model.wave.data.impl.EmptyWaveletSnapshot

  public OperationServiceHelper(WaveletName waveletName, ParticipantId participant) {
    waveletProvider = mock(WaveletProvider.class);
    EventDataConverter converter = new EventDataConverterV22();

    ObservableWaveletData waveletData = WaveletDataImpl.Factory.create(DOCUMENT_FACTORY).create(
        new EmptyWaveletSnapshot(waveletName.waveId, waveletName.waveletId, participant,
            HASH_FACTORY.createVersionZero(waveletName), 0L));
    waveletData.addParticipant(participant);

    BasicWaveletOperationContextFactory CONTEXT_FACTORY =
        new BasicWaveletOperationContextFactory(participant);
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.