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

Examples of org.waveprotocol.wave.model.operation.core.CoreWaveletDocumentOperation


      return new RemoveParticipant(context, participantId);
    } else if (coreOp instanceof CoreAddParticipant) {
      ParticipantId participantId = ((CoreAddParticipant) coreOp).getParticipantId();
      return new AddParticipant(context, participantId);
    } else if (coreOp instanceof CoreWaveletDocumentOperation) {
      CoreWaveletDocumentOperation waveletDocOp = (CoreWaveletDocumentOperation) coreOp;
      return new WaveletBlipOperation(waveletDocOp.getDocumentId(),
          new BlipContentOperation(context, waveletDocOp.getOperation()));
    } else if (coreOp instanceof CoreNoOp) {
      return new NoOp(context);
    } else {
      throw new IllegalArgumentException("unknown operation type");
    }
View Full Code Here


    } else if (op instanceof WaveletBlipOperation) {
      WaveletBlipOperation waveletBlipOp = (WaveletBlipOperation) op;
      BlipOperation blipOp = waveletBlipOp.getBlipOp();
      if (blipOp instanceof BlipContentOperation) {
        DocOp contentOp = ((BlipContentOperation) blipOp).getContentOp();
        return new CoreWaveletDocumentOperation(waveletBlipOp.getBlipId(), contentOp);
      } else if (blipOp instanceof SubmitBlip) {
        // There is no "core" submit operation, they are ignored by translating
        // them into no-ops
        return CoreNoOp.INSTANCE;
      } else {
View Full Code Here

    for (String participant : snapshot.getParticipantIdList()) {
      CoreAddParticipant addOp = new CoreAddParticipant(new ParticipantId(participant));
      ops.add(addOp);
    }
    for (DocumentSnapshot document : snapshot.getDocumentList()) {
      CoreWaveletDocumentOperation docOp = new CoreWaveletDocumentOperation(
          document.getDocumentId(), deserialize(document.getDocumentOperation()));
      ops.add(docOp);
    }
    return ops;
  }
View Full Code Here

TOP

Related Classes of org.waveprotocol.wave.model.operation.core.CoreWaveletDocumentOperation

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.