Package org.jclouds.blobstore

Examples of org.jclouds.blobstore.BlobStore.createDirectory()


   @Test
   void testToStorageMetadata() {
      assertNull(ToStorageMetadata.INSTANCE.apply(null));
      BlobStore blobStore = getBlobStore();
      blobStore.createContainerInLocation(null, "test");
      blobStore.createDirectory("test", "one");
      Set<StorageMetadata> storageMetadataSet = ImmutableSet.<StorageMetadata>builder()
                                                            .addAll(transform(blobStore.list(), ToStorageMetadata.INSTANCE))
                                                            .build();
      assertFalse(storageMetadataSet.isEmpty());
      StorageMetadata representation = storageMetadataSet.iterator().next();
View Full Code Here


   @Test
   void testToBlob() {
      assertNull(ToBlob.INSTANCE.apply(null));
      BlobStore blobStore = getBlobStore();
      blobStore.createContainerInLocation(null, "container");
      blobStore.createDirectory("container", "one");

      blobStore.putBlob("container", blobStore.blobBuilder("myblob").payload("testcontent").build());
      Blob representation = ToBlob.INSTANCE.apply(blobStore.getBlob("container", "myblob"));
      assertNotNull(representation);
      assertNotNull(representation.getBlobMetadata());
View Full Code Here

   public void testDirectoryEndingWithSlash() throws InterruptedException {
     String containerName = getContainerName();
     try {
       BlobStore blobStore = view.getBlobStore();
       blobStore.createDirectory(containerName, "someDir");

       // According to the S3 documentation, a directory is nothing but a blob
       // whose name ends with a '/'. So let's try to remove the blob we just
       // created.
       blobStore.removeBlob(containerName, "someDir/");
View Full Code Here

   @Test
   void testToStorageMetadata() {
      assertNull(ToStorageMetadata.INSTANCE.apply(null));
      BlobStore blobStore = getBlobStore();
      blobStore.createContainerInLocation(null, "test");
      blobStore.createDirectory("test", "one");
      Set<StorageMetadata> storageMetadataSet = ImmutableSet.<StorageMetadata>builder()
                                                            .addAll(transform(blobStore.list(), ToStorageMetadata.INSTANCE))
                                                            .build();
      assertFalse(storageMetadataSet.isEmpty());
      StorageMetadata representation = storageMetadataSet.iterator().next();
View Full Code Here

   @Test
   void testToBlob() {
      assertNull(ToBlob.INSTANCE.apply(null));
      BlobStore blobStore = getBlobStore();
      blobStore.createContainerInLocation(null, "container");
      blobStore.createDirectory("container", "one");

      blobStore.putBlob("container", blobStore.blobBuilder("myblob").payload(ByteSource.wrap("testcontent".getBytes())).build());
      Blob representation = ToBlob.INSTANCE.apply(blobStore.getBlob("container", "myblob"));
      assertNotNull(representation);
      assertNotNull(representation.getBlobMetadata());
View Full Code Here

   public void testDirectoryEndingWithSlash() throws InterruptedException {
     String containerName = getContainerName();
     try {
       BlobStore blobStore = view.getBlobStore();
       blobStore.createDirectory(containerName, "someDir");

       // According to the S3 documentation, a directory is nothing but a blob
       // whose name ends with a '/'. So let's try to remove the blob we just
       // created.
       blobStore.removeBlob(containerName, "someDir/");
View Full Code Here

   public void testDirectoryEndingWithSlash() throws InterruptedException {
     String containerName = getContainerName();
     try {
       BlobStore blobStore = view.getBlobStore();
       blobStore.createDirectory(containerName, "someDir");

       // According to the S3 documentation, a directory is nothing but a blob
       // whose name ends with a '/'. So let's try to remove the blob we just
       // created.
       blobStore.removeBlob(containerName, "someDir/");
View Full Code Here

   public void testDirectoryEndingWithSlash() throws InterruptedException {
     String containerName = getContainerName();
     try {
       BlobStore blobStore = view.getBlobStore();
       blobStore.createDirectory(containerName, "someDir");

       // According to the S3 documentation, a directory is nothing but a blob
       // whose name ends with a '/'. So let's try to remove the blob we just
       // created.
       blobStore.removeBlob(containerName, "someDir/");
View Full Code Here

   public void testDirectoryEndingWithSlash() throws InterruptedException {
     String containerName = getContainerName();
     try {
       BlobStore blobStore = view.getBlobStore();
       blobStore.createDirectory(containerName, "someDir");

       // According to the S3 documentation, a directory is nothing but a blob
       // whose name ends with a '/'. So let's try to remove the blob we just
       // created.
       blobStore.removeBlob(containerName, "someDir/");
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.