Package org.jclouds.azureblob.options

Examples of org.jclouds.azureblob.options.ListBlobsOptions$Builder


    * @param container
    *           container name
    */
   @Override
   public PageSet<? extends StorageMetadata> list(String container, ListContainerOptions options) {
      ListBlobsOptions azureOptions = blobStore2AzureContainerListOptions.apply(options);
      return azure2BlobStoreResourceList.apply(sync.listBlobs(container, azureOptions.includeMetadata()));
   }


@Singleton
public class ListOptionsToListBlobsOptions implements
         Function<ListContainerOptions, ListBlobsOptions> {
   public ListBlobsOptions apply(ListContainerOptions from) {
      checkNotNull(from, "set options to instance NONE instead of passing null");
      ListBlobsOptions httpOptions = new ListBlobsOptions();
      if (!from.isRecursive()) {
         httpOptions.delimiter("/");
      }
      if (from.getDir() != null) {
         httpOptions.prefix(from.getDir().endsWith("/") ? from.getDir() : from.getDir() + "/");
      }
      if (from.getMarker() != null) {
         httpOptions.marker(from.getMarker());
      }
      if (from.getMaxResults() != null) {
         httpOptions.maxResults(from.getMaxResults());
      }
      if (from.isDetailed()) {
         httpOptions.includeMetadata();
      }
      return httpOptions;
   }

TOP

Related Classes of org.jclouds.azureblob.options.ListBlobsOptions$Builder

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.