Package org.waveprotocol.wave.model.operation

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


    IndexedDocumentImpl<N, E, T, ?> doc = new IndexedDocumentImpl<N, E, T, Void>(
        substrateProvider.create("doc", Attributes.EMPTY_MAP), annotations, schema);
    try {
      doc.consume(operation);
    } catch (OperationException e) {
      throw new OperationRuntimeException("Invalid initialization", e);
    }
    return doc;
  }
View Full Code Here


    public void consume(WaveletOperation op) {
      // Update local version, simulating server response.
      try {
        op.createVersionUpdateOp(1, null).apply(data);
      } catch (OperationException e) {
        throw new OperationRuntimeException("test sink verison update failed", e);
      }

      // Pass to output sink.
      output.consume(op);
    }
View Full Code Here

  private IndexedDocument<Node, Element, Text> getDocument() {
    if (substrateDocument == null) {
      try {
        createSubstrateDocument();
      } catch (OperationException e) {
        throw new OperationRuntimeException(
            "Document initialization failed when applying operation: " +
            documentCreationContext.content, e);
      }
    }
    return substrateDocument;
View Full Code Here

        DocOp docOp = sink.consumeAndReturnInvertible(op);
        if (outputSink != null) {
          outputSink.consume(docOp);
        }
      } catch (OperationException e) {
        throw new OperationRuntimeException(
            "DocumentOperationSink constructed by DocumentOperationSinkFactory "
                + "generated an OperationException when attempting to apply " + op, e);
      }
    }
View Full Code Here

  public BootstrapDocument(BootstrapDocument other) {
    this(other.schemaConstraints);
    try {
      consume(other.asOperation());
    } catch (OperationException e) {
      throw new OperationRuntimeException("Invalid other document", e);
    }
  }
View Full Code Here

      @Override
      public void consume(Nindo op) {
        try {
          document.consumeAndReturnInvertible(op);
        } catch (OperationException oe) {
          throw new OperationRuntimeException("sequencer consume failed.", oe);
        }
      }
    };
  }
View Full Code Here

  @Override
  public void consumeAsDiff(DocOp op) {
    try {
      differ.consume(op);
    } catch (OperationException e) {
      throw new OperationRuntimeException("error applying diff op", e);
    }
    hasDiffs = true;
  }
View Full Code Here

        death = new SchemaViolatingLocalOperationException(oe.getViolations());
      } else {
        death = new BadOpLocalOperationException(oe.getViolations());
      }
    } else {
      death = new OperationRuntimeException("Invalid for current document", oe);
    }

    // If the op failed, the document may be arbitrarily broken state, so there
    // is no reason to believe that a repair will work, let alone execute
    // without throwing its own exceptions. Nevertheless, since we're about to
View Full Code Here

   */
  private static DocInitialization compose(DocInitialization state, DocOp diff) {
    try {
      return diff != null ? Composer.compose(state, diff) : state;
    } catch (OperationException e) {
      throw new OperationRuntimeException("error occurred during diff compaction", e);
    }
  }
View Full Code Here

      Doc copy = new Doc();
      try {
        copy.consume(doc.asOperation());
        return copy;
      } catch (OperationException e) {
        throw new OperationRuntimeException("Invalid other document", e);
      }
    }
View Full Code Here

TOP

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

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.