Package org.jclouds.azureblob.domain

Examples of org.jclouds.azureblob.domain.ListBlobsResponse


      }
      Set<ContainerProperties> response = getApi().listContainers(includeMetadata());
      assert null != response;
      long containerCount = response.size();
      assertTrue(containerCount >= 1);
      ListBlobsResponse list = getApi().listBlobs(privateContainer);
      assertEquals(list.getUrl(), URI.create(String.format("https://%s.blob.core.windows.net/%s", view.unwrap(
               AzureBlobApiMetadata.CONTEXT_TOKEN).getIdentity(), privateContainer)));
      // TODO .. check to see the container actually exists
   }
View Full Code Here


            } else {
               throw htpe;
            }
         }
      }
      ListBlobsResponse list = getApi().listBlobs();
      assertEquals(list.getUrl(), URI.create(String.format("https://%s.blob.core.windows.net/$root", view.unwrap(
               AzureBlobApiMetadata.CONTEXT_TOKEN).getIdentity())));
   }
View Full Code Here

      // "value-2");
      assertEquals(metadata.getMetadata().entrySet().size(), 1);
      assertEquals(metadata.getMetadata().get("mykey"), "metadata-value");

      // test listing
      ListBlobsResponse response = getApi().listBlobs(
            privateContainer,
            ListBlobsOptions.Builder
                  .prefix(object.getProperties().getName().substring(0, object.getProperties().getName().length() - 1))
                  .maxResults(1).includeMetadata());
      assertEquals(response.size(), 1);
      assertEquals(Iterables.getOnlyElement(response).getName(), object.getProperties().getName());
      assertEquals(Iterables.getOnlyElement(response).getMetadata(), ImmutableMap.of("mykey", "metadata-value"));

      // Test PUT with invalid ETag (as if object's data was corrupted in
      // transit)
View Full Code Here

      }
      Set<ContainerProperties> response = getApi().listContainers(includeMetadata());
      assert null != response;
      long containerCount = response.size();
      assertTrue(containerCount >= 1);
      ListBlobsResponse list = getApi().listBlobs(privateContainer);
      assertEquals(list.getUrl(), URI.create(String.format("https://%s.blob.core.windows.net/%s", view.unwrap(
               AzureBlobApiMetadata.CONTEXT_TOKEN).getIdentity(), privateContainer)));
      // TODO .. check to see the container actually exists
   }
View Full Code Here

            } else {
               throw htpe;
            }
         }
      }
      ListBlobsResponse list = getApi().listBlobs();
      assertEquals(list.getUrl(), URI.create(String.format("https://%s.blob.core.windows.net/$root", view.unwrap(
               AzureBlobApiMetadata.CONTEXT_TOKEN).getIdentity())));
   }
View Full Code Here

      // "value-2");
      assertEquals(metadata.getMetadata().entrySet().size(), 1);
      assertEquals(metadata.getMetadata().get("mykey"), "metadata-value");

      // test listing
      ListBlobsResponse response = getApi().listBlobs(
            privateContainer,
            ListBlobsOptions.Builder
                  .prefix(object.getProperties().getName().substring(0, object.getProperties().getName().length() - 1))
                  .maxResults(1).includeMetadata());
      assertEquals(response.size(), 1);
      assertEquals(Iterables.getOnlyElement(response).getName(), object.getProperties().getName());
      assertEquals(Iterables.getOnlyElement(response).getMetadata(), ImmutableMap.of("mykey", "metadata-value"));

      // Test PUT with invalid ETag (as if object's data was corrupted in
      // transit)
View Full Code Here

      }
      Set<ContainerProperties> response = getApi().listContainers(includeMetadata());
      assert null != response;
      long containerCount = response.size();
      assertTrue(containerCount >= 1);
      ListBlobsResponse list = getApi().listBlobs(privateContainer);
      assertEquals(list.getUrl(), URI.create(String.format("https://%s.blob.core.windows.net/%s", view.unwrap(
               AzureBlobApiMetadata.CONTEXT_TOKEN).getIdentity(), privateContainer)));
      // TODO .. check to see the container actually exists
   }
View Full Code Here

            } else {
               throw htpe;
            }
         }
      }
      ListBlobsResponse list = getApi().listBlobs();
      assertEquals(list.getUrl(), URI.create(String.format("https://%s.blob.core.windows.net/$root", view.unwrap(
               AzureBlobApiMetadata.CONTEXT_TOKEN).getIdentity())));
   }
View Full Code Here

      // "value-2");
      assertEquals(metadata.getMetadata().entrySet().size(), 1);
      assertEquals(metadata.getMetadata().get("mykey"), "metadata-value");

      // test listing
      ListBlobsResponse response = getApi().listBlobs(
            privateContainer,
            ListBlobsOptions.Builder
                  .prefix(object.getProperties().getName().substring(0, object.getProperties().getName().length() - 1))
                  .maxResults(1).includeMetadata());
      assertEquals(response.size(), 1);
      assertEquals(Iterables.getOnlyElement(response).getName(), object.getProperties().getName());
      assertEquals(Iterables.getOnlyElement(response).getMetadata(), ImmutableMap.of("mykey", "metadata-value"));

      // Test PUT with invalid ETag (as if object's data was corrupted in
      // transit)
View Full Code Here

                  .create("http://myaccount.blob.core.windows.net/mycontainer/newblob1.txt"), dateService
                  .rfc822DateParse("Thu, 18 Sep 2008 18:41:57 GMT"), "0x8CAE7D55CF6C339", 25,
                  "text/plain; charset=UTF-8", null, null, null, null, LeaseStatus.UNLOCKED, ImmutableMap
                        .<String, String> of()));

      ListBlobsResponse list = new HashSetListBlobsResponse(contents,
            URI.create("http://myaccount.blob.core.windows.net/mycontainer"), "myfolder/", null, 4, "newblob2.txt",
            null, ImmutableSet.<String> of("myfolder/"));

      ListBlobsResponse result = factory.create(
            injector.getInstance(ContainerNameEnumerationResultsHandler.class)).parse(is);

      assertEquals(result, list);
   }
View Full Code Here

TOP

Related Classes of org.jclouds.azureblob.domain.ListBlobsResponse

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.