Package org.waveprotocol.wave.model.wave.opbased

Examples of org.waveprotocol.wave.model.wave.opbased.OpBasedWavelet


    lastContextFactory = new MockWaveletOperationContextFactory().setParticipantId(author);
    lastAuthoriser = new MockParticipationHelper();
    SilentOperationSink<WaveletOperation> executor =
        Executor.<WaveletOperation, WaveletData>build(waveData);
    SilentOperationSink<WaveletOperation> out = new VersionIncrementingSink(waveData, sink);
    return new OpBasedWavelet(waveId, waveData, lastContextFactory, lastAuthoriser, executor, out);
  }
View Full Code Here


    ObservableWaveletData convWavelet = root != null ? root : other;
    SupplementedWave supplement = null;
    ObservableConversationView conversations = null;
    if (convWavelet != null) {
      OpBasedWavelet wavelet = OpBasedWavelet.createReadOnly(convWavelet);
      if (WaveletBasedConversation.waveletHasConversation(wavelet)) {
        conversations = conversationUtil.buildConversation(wavelet);
        supplement = buildSupplement(participant, conversations, udw);
      }
    }
View Full Code Here

            } catch (OperationException e) {
              throw new OperationRuntimeException("Error applying op", e);
            }
          }
        };
        return new OpBasedWavelet(waveId,
            data,
            new BasicWaveletOperationContextFactory(creator) {
              @Override public long currentTimeMillis() {
                return creationTime;
              }
View Full Code Here

      ObservableWaveletData convWavelet = root != null ? root : other;
      SupplementedWave supplement = null;
      ObservableConversationView conversations = null;
      if (convWavelet != null) {
        OpBasedWavelet wavelet = OpBasedWavelet.createReadOnly(convWavelet);
        if (WaveletBasedConversation.waveletHasConversation(wavelet)) {
          conversations = conversationUtil.buildConversation(wavelet);
          supplement = buildSupplement(participant, conversations, udw);
        }
      }
View Full Code Here

  @Override
  public void execute(
      OperationRequest operation, OperationContext context, ParticipantId participant)
      throws InvalidRequestException {
    OpBasedWavelet wavelet = context.openWavelet(operation, participant);
    ObservableConversationView conversationView = context.openConversation(operation, participant);

    String waveletId = OperationUtil.getRequiredParameter(operation, ParamsProperty.WAVELET_ID);
    String conversationId;
View Full Code Here

      }
    }

    WaveletName waveletName = context.getConversationUtil().generateWaveletName();
    RobotWaveletData newWavelet = createEmptyRobotWavelet(participant, waveletName);
    OpBasedWavelet opBasedWavelet = newWavelet.getOpBasedWavelet(participant);

    WaveletBasedConversation.makeWaveletConversational(opBasedWavelet);

    ObservableConversationView conversation =
        context.getConversationUtil().buildConversation(opBasedWavelet);
    ObservableConversationBlip rootBlip = conversation.getRoot().getRootThread().appendBlip();

    for (ParticipantId newParticipant : participants) {
      opBasedWavelet.addParticipant(newParticipant);
    }

    // Store the temporary id of the wavelet and rootblip so that future
    // operations can reference it.
    try {
View Full Code Here

    String blipId = OperationUtil.getRequiredParameter(operation, ParamsProperty.BLIP_ID);

    DocumentModifyAction modifyAction =
        OperationUtil.getRequiredParameter(operation, ParamsProperty.MODIFY_ACTION);

    OpBasedWavelet wavelet = context.openWavelet(operation, participant);
    ObservableConversation conversation =
        context.openConversation(operation, participant).getRoot();
    Document doc = context.getBlip(conversation, blipId).getContent();

    ApiView view = new ApiView(doc, wavelet);
View Full Code Here

  @Override
  public void execute(
      OperationRequest operation, OperationContext context, ParticipantId participant)
      throws InvalidRequestException {
    OpBasedWavelet wavelet = context.openWavelet(operation, participant);
    ObservableConversation conversation =
        context.openConversation(operation, participant).getRoot();

    EventMessageBundle messages =
        mapWaveletToMessageBundle(context.getConverter(), participant, wavelet, conversation);
View Full Code Here

   * @param data data object for the wavelet
   * @return mutable operation-backed wavelet.
   */
  public OpBasedWavelet operationalize(ObservableWaveletData data) {
    LiveTarget<ObservableWaveletData, WaveletOperation> target = createSinks(data);
    return new OpBasedWavelet(waveId,
        data,
        opContextFactory,
        ParticipationHelper.DEFAULT,
        target.getExecutorSink(),
        target.getOutputSink());
View Full Code Here

    // Create operation adapter, which translates semantic methods into
    // operations, applying them to the target as well as sending them down
    // the operation channel. Local operation failure fails this wavelet
    // permanently.
    wavelet = new OpBasedWavelet(waveId, target, contextFactory, participationHelper,
        opTap.incoming(), opTap.outgoing());

    // Create operation sucker, which sucks operations out of the channel and
    // applies them to the CC target.
    driver = new OperationSucker(channel, opTap.incoming());
View Full Code Here

TOP

Related Classes of org.waveprotocol.wave.model.wave.opbased.OpBasedWavelet

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.