Package org.waveprotocol.wave.model.operation.wave

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


   * primitive blip, then boxed as a wave operation and sent to the wavelet
   * adapter.
   */
  private void consume(DocOp op) {
    // Box as blip op, and update local blip
    BlipContentOperation blipOp = new BlipContentOperation(wavelet.createContext(), op);
    blipOp.update(OpBasedBlip.this.blip);
    // Box as wavelet op, and pass to wavelet adapter
    outputSink.consume(new WaveletBlipOperation(getId(), blipOp));
  }
View Full Code Here


      return new AddParticipant(context, participantId);
    } else if (op instanceof CoreWaveletDocumentOperation) {
      CoreWaveletDocumentOperation waveletDocOp = (CoreWaveletDocumentOperation) op;
      String documentId = waveletDocOp.getDocumentId();
      DocOp operation = waveletDocOp.getOperation();
      return new WaveletBlipOperation(documentId, new BlipContentOperation(context, operation));
    }

    throw new RuntimeException("unhandled operation type");
  }
View Full Code Here

      return new AddParticipant(context, new ParticipantId(protobufOp.getAddParticipant()));
    } else if (protobufOp.hasRemoveParticipant()) {
      return new RemoveParticipant(context, new ParticipantId(protobufOp.getRemoveParticipant()));
    } else if (protobufOp.hasMutateDocument()) {
      return new WaveletBlipOperation(protobufOp.getMutateDocument().getDocumentId(),
          new BlipContentOperation(context,
              deserialize(protobufOp.getMutateDocument().getDocumentOperation())));
    } else {
      throw new IllegalArgumentException("Unsupported operation: " + protobufOp);
    }
  }
View Full Code Here

      return new AddParticipant(ctx, new ParticipantId(protobufOp.getAddParticipant()));
    } else if (protobufOp.hasRemoveParticipant()) {
      return new RemoveParticipant(ctx, new ParticipantId(protobufOp.getRemoveParticipant()));
    } else if (protobufOp.hasMutateDocument()) {
      return new WaveletBlipOperation(protobufOp.getMutateDocument().getDocumentId(),
          new BlipContentOperation(ctx, deserialize(protobufOp.getMutateDocument()
              .getDocumentOperation())));
    } else {
      throw new IllegalArgumentException("Unsupported operation: " + protobufOp);
    }
  }
View Full Code Here

      return inverse;
    }

    @Override
    public void visitBlipContentOperation(BlipContentOperation op) {
      inverse = new BlipContentOperation(reverseContext, DocOpInverter.invert(op.getContentOp()));
    }
View Full Code Here

TOP

Related Classes of org.waveprotocol.wave.model.operation.wave.BlipContentOperation

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.