Package org.jclouds.blobstore

Examples of org.jclouds.blobstore.ContainerNotFoundException


            if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
               String path = command.getCurrentRequest().getEndpoint().getPath();
               Matcher matcher = CONTAINER_PATH.matcher(path);
               Exception oldException = exception;
               if (matcher.find()) {
                  exception = new ContainerNotFoundException(matcher.group(1), message);
                  exception.initCause(oldException);
               } else {
                  matcher = CONTAINER_KEY_PATH.matcher(path);
                  if (matcher.find()) {
                     exception = new KeyNotFoundException(matcher.group(1), matcher.group(2), message);
View Full Code Here


   protected Object doExecute() throws Exception {
      BlobStore blobStore = getBlobStore();

      for (String container : containerNames) {
          if (!blobStore.containerExists(container)) {
             throw new ContainerNotFoundException(container, "while checking existence");
          }
      }
      return null;
   }
View Full Code Here

               found = true;
               break;
            }
         }
         if (!found) {
            throw new ContainerNotFoundException(containerName, "while getting container metadata");
         }
      }

      return null;
   }
View Full Code Here

      }

      Blob blob = blobStore.getBlob(containerName, blobName);
      if (blob == null) {
         if (!blobStore.containerExists(containerName)) {
            throw new ContainerNotFoundException(containerName, "while getting blob");
         }
         throw new KeyNotFoundException(containerName, blobName, "while getting blob");
      }
      return blob.getPayload().openStream();
   }
View Full Code Here

            if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
               String path = command.getCurrentRequest().getEndpoint().getPath();
               Matcher matcher = CONTAINER_PATH.matcher(path);
               Exception oldException = exception;
               if (matcher.find()) {
                  exception = new ContainerNotFoundException(matcher.group(1), message);
                  exception.initCause(oldException);
               } else {
                  matcher = CONTAINER_KEY_PATH.matcher(path);
                  if (matcher.find()) {
                     exception = new KeyNotFoundException(matcher.group(1), matcher.group(2), message);
View Full Code Here

            } else if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
               String path = command.getCurrentRequest().getEndpoint().getPath();
               Matcher matcher = CONTAINER_PATH.matcher(path);
              
               if (matcher.find()) {
                  exception = new ContainerNotFoundException(matcher.group(1), message);
                  exception.initCause(oldException);
               } else {
                  matcher = CONTAINER_KEY_PATH.matcher(path);
                  if (matcher.find()) {
                     exception = new KeyNotFoundException(matcher.group(1), matcher.group(2), message);
View Full Code Here

            if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
               String path = command.getCurrentRequest().getEndpoint().getPath();
               Matcher matcher = CONTAINER_PATH.matcher(path);
               Exception oldException = exception;
               if (matcher.find()) {
                  exception = new ContainerNotFoundException(matcher.group(1), message);
                  exception.initCause(oldException);
               } else {
                  matcher = CONTAINER_KEY_PATH.matcher(path);
                  if (matcher.find()) {
                     exception = new KeyNotFoundException(matcher.group(1), matcher.group(2), message);
View Full Code Here

            else if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
               String path = command.getCurrentRequest().getEndpoint().getPath();
               Matcher matcher = CONTAINER_PATH.matcher(path);
              
               if (matcher.find()) {
                  exception = new ContainerNotFoundException(matcher.group(1), message);
                  exception.initCause(oldException);
               } else {
                  matcher = CONTAINER_KEY_PATH.matcher(path);
                  if (matcher.find()) {
                     exception = new KeyNotFoundException(matcher.group(1), matcher.group(2), message);
View Full Code Here

            if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
               String path = command.getCurrentRequest().getEndpoint().getPath();
               Matcher matcher = CONTAINER_PATH.matcher(path);
               Exception oldException = exception;
               if (matcher.find()) {
                  exception = new ContainerNotFoundException(matcher.group(1), message);
                  exception.initCause(oldException);
               } else {
                  matcher = CONTAINER_KEY_PATH.matcher(path);
                  if (matcher.find()) {
                     exception = new KeyNotFoundException(matcher.group(1), matcher.group(2), message);
View Full Code Here

   public InputSupplier<InputStream> getBlobInputStream(BlobStore blobStore, String containerName, String blobName)
         throws Exception {
      Blob blob = blobStore.getBlob(containerName, blobName);
      if (blob == null) {
         if (!blobStore.containerExists(containerName)) {
            throw new ContainerNotFoundException(containerName, "while getting blob");
         }
         throw new KeyNotFoundException(containerName, blobName, "while getting blob");
      }
      return blob.getPayload();
   }
View Full Code Here

TOP

Related Classes of org.jclouds.blobstore.ContainerNotFoundException

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.