Examples of WaveId


Examples of org.waveprotocol.wave.model.id.WaveId

      new CopyOnWriteArraySet<PerUserWaveViewBus.Listener>();

  @Override
  public void waveletUpdate(ReadableWaveletData wavelet, DeltaSequence deltas) {
    WaveletId waveletId = wavelet.getWaveletId();
    WaveId waveId = wavelet.getWaveId();
    WaveletName waveletName = WaveletName.of(waveId, waveletId);
    if(LOG.isInfoLoggable()) {
      LOG.info("Got update for " + waveId + " " + waveletId);
    }
View Full Code Here

Examples of org.waveprotocol.wave.model.id.WaveId

   * @param waveletData the wavelet data to be deserialized.
   * @return an instance of {@link Wavelet}.
   */
  public static Wavelet deserialize(OperationQueue operationQueue, Map<String, Blip> blips,
      Map<String, BlipThread> threads, WaveletData waveletData) {
    WaveId waveId;
    WaveletId waveletId;
    try {
      waveId = ApiIdSerializer.instance().deserialiseWaveId(waveletData.getWaveId());
      waveletId = ApiIdSerializer.instance().deserialiseWaveletId(waveletData.getWaveletId());
    } catch (InvalidIdException e) {
View Full Code Here

Examples of org.waveprotocol.wave.model.id.WaveId

    }

    String waveDomain = decode(tokens[0].toLowerCase());
    String waveIdStr = decode(tokens[1]);

    WaveId waveId = null;

    try {
      waveId = WaveId.of(waveDomain, waveIdStr);
    } catch (IllegalArgumentException e) {
      throw new InvalidWaveRefException(path, "Invalid WaveID:" + e.getMessage());
View Full Code Here

Examples of org.waveprotocol.wave.model.id.WaveId

      // second operation, since makeRpc prepends the robot.notify() operation.
      JsonRpcResponse response = this.submit(newWavelet, rpcServerUrl).get(1);
      if (response.isError()) {
        throw new IOException(response.getErrorMessage());
      }
      WaveId waveId = ApiIdSerializer.instance().deserialiseWaveId(
          (String) response.getData().get(ParamsProperty.WAVE_ID));
      WaveletId waveletId = ApiIdSerializer.instance().deserialiseWaveletId(
          (String) response.getData().get(ParamsProperty.WAVELET_ID));
      String rootBlipId = (String) response.getData().get(ParamsProperty.BLIP_ID);
View Full Code Here

Examples of org.waveprotocol.wave.model.id.WaveId

      ExceptionalIterator<WaveId, PersistenceException> srcItr = sourceStore.getWaveIdIterator();

      // Waves
      while (srcItr.hasNext()) {

        WaveId waveId = srcItr.next();

        ImmutableSet<WaveletId> waveletIds = sourceStore.lookup(waveId);

        if (!targetStore.lookup(waveId).isEmpty()) {
          LOG.info("Skipping Wave because it's found in target store : " + waveId.toString());
          continue;
        }

        LOG.info("Migrating Wave : " + waveId.toString() + " with " + waveletIds.size()
            + " wavelets");

        int waveletsTotal = waveletIds.size();
        int waveletsCount = 0;
View Full Code Here

Examples of org.waveprotocol.wave.model.id.WaveId

  }

  @Override
  public void open(final RpcController controller, ProtocolOpenRequest request,
      final RpcCallback<ProtocolWaveletUpdate> done) {
    WaveId waveId;
    try {
      waveId = ModernIdSerialiser.INSTANCE.deserialiseWaveId(request.getWaveId());
    } catch (InvalidIdException e) {
      LOG.warning("Invalid id in open", e);
      controller.setFailed(e.getMessage());
View Full Code Here

Examples of org.waveprotocol.wave.model.id.WaveId

   */
  public void loadAllWavelets() throws WaveletStateException {
    try {
      ExceptionalIterator<WaveId, PersistenceException> itr = store.getWaveIdIterator();
      while (itr.hasNext()) {
        WaveId waveId = itr.next();
        lookupWavelets(waveId);
      }
    } catch (PersistenceException e) {
      throw new WaveletStateException("Failed to scan waves", e);
    }
View Full Code Here

Examples of org.waveprotocol.wave.model.id.WaveId

    int updatedCount = 0;
    int skippedCount = 0;
    int failedCount = 0;
    for (int i = 0; i < waveDirs.length; i++) {
      File waveDir = waveDirs[i];
      WaveId sourceWaveId = FileNames.getWaveIdFromFileName(waveDir.getName());
      WaveId targetWaveId = DomainConverter.convertWaveId(sourceWaveId, waveDomain);
      Console.println("Importing wave " + targetWaveId.serialise()
          + " (" + (i + 1) + " of " + waveDirs.length + ") ...");
      boolean waveCreated = false;
      boolean waveUpdated = false;
      File[] waveletDirs = waveDir.listFiles();
      for (File waveletDir : waveletDirs) {
View Full Code Here

Examples of org.waveprotocol.wave.model.id.WaveId

  }

  private ImportWaveletState importWavelet(WaveId sourceWaveId, WaveletId sourceWaveletId)
      throws IOException {
    ImportWaveletState state = ImportWaveletState.NOTHING_DONE;
    WaveId targetWaveId = DomainConverter.convertWaveId(sourceWaveId, waveDomain);
    WaveletId targetWaveletId;
    try {
      targetWaveletId = DomainConverter.convertWaveletId(sourceWaveletId, waveDomain);
    } catch (InvalidParticipantAddress ex) {
      throw new IOException(ex);
View Full Code Here

Examples of org.waveprotocol.wave.model.id.WaveId

    }
    int exportedCount = 0;
    int failedCount = 0;
    for (int i = 0; i < waves.size(); i++) {
      boolean errorOccured = false;
      WaveId waveId = waves.get(i);
      try {
        if (excludeList != null && excludeList.contains(waveId)) {
          Console.println("Skipping wave " + waveId.serialise() + "...");
          continue;
        }
        Console.println("Exporting wave " + waveId.serialise()
            + " (" + (i + 1) + " of " + waves.size() + ") ...");
        new File(fileNames.getWaveDirPath(waveId)).mkdir();
        for (WaveletId waveletId : api.retrieveWaveletIds(waveId, rpcServerUrl)) {
          WaveletSnapshotProtoImpl snapshot = exportSnapshot(waveId, waveletId);
          Set<AttachmentId> attachmentIds = new HashSet<AttachmentId>();
          try {
            exportDeltas(waveId, waveletId, snapshot.getVersion().getPB(), attachmentIds);
          } catch (IOException ex) {
            errorOccured = true;
            Console.error("Export of deltas error.", ex);
          }
          if (!attachmentIds.isEmpty()) {
            new File(fileNames.getAttachmentsDirPath(waveId, waveletId)).mkdir();
            for (AttachmentId attachmentId : attachmentIds) {
              try {
                exportAttachment(waveId, waveletId, attachmentId);
              } catch (IOException ex) {
                errorOccured = true;
                Console.error("Uploading of attachment error.", ex);
              }
            }
          }
        }
      } catch (Exception ex) {
        errorOccured = true;
        Console.error("Exporting of " + waveId.serialise() + " error.", ex);
      }
      if (errorOccured) {
        failedCount++;
      } else {
        exportedCount++;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.