Package org.waveprotocol.wave.federation.proto

Examples of org.waveprotocol.wave.federation.proto.ProtocolWaveletDeltaProtoImpl


  @Override
  public void copyFrom(SubmitDeltaRequest message) {
    setWaveId(message.getWaveId());
    setWaveletId(message.getWaveletId());
    setDelta(new ProtocolWaveletDeltaProtoImpl(message.getDelta()));
    setChannelId(message.getChannelId());
  }
View Full Code Here


  }

  @Override
  public ProtocolWaveletDeltaProtoImpl getDelta() {
    switchToProto();
    return new ProtocolWaveletDeltaProtoImpl(proto.getDelta());
  }
View Full Code Here

  /** Get or create a ProtocolWaveletDeltaProtoImpl from a ProtocolWaveletDelta. */
  private ProtocolWaveletDeltaProtoImpl getOrCreateProtocolWaveletDeltaProtoImpl(ProtocolWaveletDelta message) {
    if (message instanceof ProtocolWaveletDeltaProtoImpl) {
      return (ProtocolWaveletDeltaProtoImpl) message;
    } else {
      ProtocolWaveletDeltaProtoImpl messageImpl = new ProtocolWaveletDeltaProtoImpl();
      messageImpl.copyFrom(message);
      return messageImpl;
    }
  }
View Full Code Here

      setWaveletId(elem.getAsString());
    }
    if (jsonObject.has("3")) {
      JsonElement elem = jsonObject.get("3");
      {
        ProtocolWaveletDeltaProtoImpl payload = new ProtocolWaveletDeltaProtoImpl();
        GsonUtil.extractJsonObject(payload, elem, gson, raw);
        setDelta(payload);
      }
    }
    if (jsonObject.has("4")) {
View Full Code Here

  }

  @Override
  public void copyFrom(ProtocolSubmitRequest message) {
    setWaveletName(message.getWaveletName());
    setDelta(new ProtocolWaveletDeltaProtoImpl(message.getDelta()));
    if (message.hasChannelId()) {
      setChannelId(message.getChannelId());
    } else {
      clearChannelId();
    }
View Full Code Here

  }

  @Override
  public ProtocolWaveletDeltaProtoImpl getDelta() {
    switchToProto();
    return new ProtocolWaveletDeltaProtoImpl(proto.getDelta());
  }
View Full Code Here

  /** Get or create a ProtocolWaveletDeltaProtoImpl from a ProtocolWaveletDelta. */
  private ProtocolWaveletDeltaProtoImpl getOrCreateProtocolWaveletDeltaProtoImpl(ProtocolWaveletDelta message) {
    if (message instanceof ProtocolWaveletDeltaProtoImpl) {
      return (ProtocolWaveletDeltaProtoImpl) message;
    } else {
      ProtocolWaveletDeltaProtoImpl messageImpl = new ProtocolWaveletDeltaProtoImpl();
      messageImpl.copyFrom(message);
      return messageImpl;
    }
  }
View Full Code Here

      setWaveletName(elem.getAsString());
    }
    if (jsonObject.has("2")) {
      JsonElement elem = jsonObject.get("2");
      {
        ProtocolWaveletDeltaProtoImpl payload = new ProtocolWaveletDeltaProtoImpl();
        GsonUtil.extractJsonObject(payload, elem, gson, raw);
        setDelta(payload);
      }
    }
    if (jsonObject.has("3")) {
View Full Code Here

  @Override
  public void copyFrom(ProtocolWaveletUpdate message) {
    setWaveletName(message.getWaveletName());
    clearAppliedDelta();
    for (ProtocolWaveletDelta field : message.getAppliedDelta()) {
      addAppliedDelta(new ProtocolWaveletDeltaProtoImpl(field));
    }
    if (message.hasCommitNotice()) {
      setCommitNotice(new ProtocolHashedVersionProtoImpl(message.getCommitNotice()));
    } else {
      clearCommitNotice();
View Full Code Here

  @Override
  public List<ProtocolWaveletDeltaProtoImpl> getAppliedDelta() {
    switchToProto();
    List<ProtocolWaveletDeltaProtoImpl> list = new ArrayList<ProtocolWaveletDeltaProtoImpl>();
    for (int i = 0; i < getAppliedDeltaSize(); i++) {
      ProtocolWaveletDeltaProtoImpl message = new ProtocolWaveletDeltaProtoImpl(proto.getAppliedDelta(i));
      list.add(message);
    }
    return list;
  }
View Full Code Here

TOP

Related Classes of org.waveprotocol.wave.federation.proto.ProtocolWaveletDeltaProtoImpl

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.