Package org.akubraproject

Examples of org.akubraproject.Blob.moveTo()


    // check if move is supported
    if (!isMoveToSupp) {
      shouldFail(new ConAction() {
        public void run(BlobStoreConnection con) throws Exception {
          Blob b = getBlob(con, createId("blobMoveTo1"), false);
          b.moveTo(b.getId(), null);
        }
      }, UnsupportedOperationException.class, null);

      return;
    }
View Full Code Here


    // move from non-existent blob should fail
    shouldFail(new ConAction() {
      public void run(BlobStoreConnection con) throws Exception {
        Blob ob = getBlob(con, id1, false);
        ob.moveTo(id3, null);
      }
    }, MissingBlobException.class, id1);

    getBlob(id1, null, true);
    getBlob(id3, null, true);
View Full Code Here

    // move to existing blob should fail
    shouldFail(new ConAction() {
      public void run(BlobStoreConnection con) throws Exception {
        Blob ob = getBlob(con, id2, "foo");
        ob.moveTo(id4, null);
      }
    }, DuplicateBlobException.class, id4);

    getBlob(id2, "foo", true);
    getBlob(id4, "bar", true);
View Full Code Here

    // move a non-existent blob onto itself should fail
    shouldFail(new ConAction() {
      public void run(BlobStoreConnection con) throws Exception {
        Blob b = getBlob(con, id1, false);
        b.moveTo(id1, null);
      }
    }, MissingBlobException.class, id1);

    getBlob(id1, null, true);
View Full Code Here

    // move an existing blob onto itself should fail
    shouldFail(new ConAction() {
      public void run(BlobStoreConnection con) throws Exception {
        Blob b = getBlob(con, id2, "foo");
        b.moveTo(id2, null);
      }
    }, DuplicateBlobException.class, id2);

    getBlob(id2, "foo", true);
View Full Code Here

    if (!isIdGenSupp) {
      // move to null should fail
      shouldFail(new ConAction() {
        public void run(BlobStoreConnection con) throws Exception {
          Blob b = getBlob(con, id2, "foo");
          b.moveTo(null, null);
        }
      }, UnsupportedOperationException.class, null);

      getBlob(id2, "foo", true);
    } else {
View Full Code Here

      runTests(new ConAction() {
          public void run(BlobStoreConnection con) throws Exception {
            Blob b = getBlob(con, id2, "foo");
            Blob b2 = b.moveTo(null, null);
            // undo for other tests
            b2.moveTo(id2, null);
          }
      }, false);
    }

    // move to incompatible blob should fail
View Full Code Here

    final URI inv = getInvalidId();
    if (inv != null) {
      shouldFail(new ConAction() {
        public void run(BlobStoreConnection con) throws Exception {
          Blob ob = getBlob(con, id2, "foo");
          ob.moveTo(inv, null);
        }
      }, UnsupportedIdException.class, inv);
    }

    getBlob(id2, "foo", true);
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.