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

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


              new AddParticipant(newContext, convertGooglewaveToGmail(op.getParticipantId())));
        }

        @Override public void visitRemoveParticipant(RemoveParticipant op) {
          setResult(
              new RemoveParticipant(newContext, convertGooglewaveToGmail(op.getParticipantId())));
        }

        @Override public void visitWaveletBlipOperation(WaveletBlipOperation waveletOp) {
          setResult(WaveletOperation.cloneOp(waveletOp, newContext));
        }
View Full Code Here


        return new NoOp(context);
      } else if (message.getAddParticipant() != null && !message.getAddParticipant().isEmpty()) {
        return new AddParticipant(context, ParticipantId.of(message.getAddParticipant()));
      } else if (message.getRemoveParticipant() != null
          && !message.getRemoveParticipant().isEmpty()) {
        return new RemoveParticipant(context, ParticipantId.of(message.getRemoveParticipant()));
      } else if (message.getMutateDocument() != null) {
        return createBlipOperation(context, message, checkWellFormed);
      }
      throw new IllegalArgumentException("Unsupported operation: " + message);
    } catch (InvalidParticipantAddress e) {
View Full Code Here

    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

   * Creates and consumes a {@link RemoveParticipant} operation.
   */
  @Override
  public void removeParticipant(ParticipantId participant) {
    if (wavelet.getParticipants().contains(participant)) {
      authoriseApplyAndSend(new RemoveParticipant(createContext(), participant));
    }
  }
View Full Code Here

  private WaveletOperation coreWaveletOpsToWaveletOps(CoreWaveletOperation op,
      WaveletOperationContext context) {
    if (op instanceof CoreRemoveParticipant) {
      ParticipantId participantId = ((CoreRemoveParticipant) op).getParticipantId();
      return new RemoveParticipant(context, participantId);
    } else if (op instanceof CoreAddParticipant) {
      ParticipantId participantId = ((CoreAddParticipant) op).getParticipantId();
      return new AddParticipant(context, participantId);
    } else if (op instanceof CoreWaveletDocumentOperation) {
      CoreWaveletDocumentOperation waveletDocOp = (CoreWaveletDocumentOperation) op;
View Full Code Here

    if (protobufOp.hasNoOp()) {
      return new NoOp(context);
    } else if (protobufOp.hasAddParticipant()) {
      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 {
View Full Code Here

    if (protobufOp.hasNoOp()) {
      return new NoOp(ctx);
    } else if (protobufOp.hasAddParticipant()) {
      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 {
View Full Code Here

    throw new UnsupportedOperationException();
  }

  @Override
  public void visitAddParticipant(AddParticipant op) {
    inverse = new RemoveParticipant(reverseContext, op.getParticipantId());
  }
View Full Code Here

TOP

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

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.