Package org.waveprotocol.box.common.comms.proto

Examples of org.waveprotocol.box.common.comms.proto.WaveletVersionProtoImpl


    for (String field : message.getWaveletIdPrefix()) {
      addWaveletIdPrefix(field);
    }
    clearKnownWavelet();
    for (WaveletVersion field : message.getKnownWavelet()) {
      addKnownWavelet(new WaveletVersionProtoImpl(field));
    }
  }
View Full Code Here


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

  }

  @Override
  public WaveletVersionProtoImpl getKnownWavelet(int n) {
    switchToProto();
    return new WaveletVersionProtoImpl(proto.getKnownWavelet(n));
  }
View Full Code Here

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

    if (jsonObject.has("4")) {
      JsonElement elem = jsonObject.get("4");
      {
        JsonArray array = elem.getAsJsonArray();
        for (int i = 0; i < array.size(); i++) {
          WaveletVersionProtoImpl payload = new WaveletVersionProtoImpl();
          GsonUtil.extractJsonObject(payload, array.get(i), gson, raw);
          addKnownWavelet(payload);
        }
      }
    }
View Full Code Here

TOP

Related Classes of org.waveprotocol.box.common.comms.proto.WaveletVersionProtoImpl

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.