@Override public void setBlobAccess(String containerName, String blobName, BlobAccess access) { Map<String, BlobAccess> map = containerToBlobAccess.get(containerName); if (map == null) { throw new ContainerNotFoundException(containerName, "in setBlobAccess"); } map.put(blobName, access); }
@Override public void setBlobAccess(String containerName, String blobName, BlobAccess access) { Map<String, BlobAccess> map = containerToBlobAccess.get(containerName); if (map == null) { throw new ContainerNotFoundException(containerName, "in setBlobAccess"); } map.put(blobName, access); }
@Override public void setBlobAccess(String containerName, String blobName, BlobAccess access) { Map<String, BlobAccess> map = containerToBlobAccess.get(containerName); if (map == null) { throw new ContainerNotFoundException(containerName, "in setBlobAccess"); } map.put(blobName, access); }
public Object createOrPropagate(Throwable t) throws Exception { if (contains404(checkNotNull(t, "throwable"))) throw new ContainerNotFoundException(t); throw propagate(t); } }
public Object createOrPropagate(Throwable t) throws Exception { if (contains404(checkNotNull(t, "throwable"))) throw new ContainerNotFoundException(t); throw propagate(t); } }
public Object createOrPropagate(Throwable t) throws Exception { if (contains404(checkNotNull(t, "throwable"))) throw new ContainerNotFoundException(t); throw propagate(t); }
private ContainerNotFoundException cnfe(final String name) { return new ContainerNotFoundException(name, String.format( "container %s not in %s", name, storageStrategy.getAllContainerNames())); }
private ContainerNotFoundException cnfe(final String name) { return new ContainerNotFoundException(name, String.format( "container %s not in %s", name, storageStrategy.getAllContainerNames())); }
@Override public BlobAccess getBlobAccess(String containerName, String blobName) { Map<String, BlobAccess> map = containerToBlobAccess.get(containerName); if (map == null) { throw new ContainerNotFoundException(containerName, "in getBlobAccess"); } BlobAccess access = map.get(blobName); if (access == null) { throw new KeyNotFoundException(containerName, blobName, "in getBlobAccess"); } return access; }
private ContainerNotFoundException cnfe(final String name) { return new ContainerNotFoundException(name, String.format( "container %s not in %s", name, storageStrategy.getAllContainerNames())); }
private ContainerNotFoundException cnfe(final String name) { return new ContainerNotFoundException(name, String.format( "container %s not in %s", name, storageStrategy.getAllContainerNames())); }
@Override public BlobAccess getBlobAccess(String containerName, String blobName) { Map<String, BlobAccess> map = containerToBlobAccess.get(containerName); if (map == null) { throw new ContainerNotFoundException(containerName, "in getBlobAccess"); } BlobAccess access = map.get(blobName); if (access == null) { throw new KeyNotFoundException(containerName, blobName, "in getBlobAccess"); } return access; }
public Object createOrPropagate(Throwable t) throws Exception { if (contains404(checkNotNull(t, "throwable"))) throw new ContainerNotFoundException(t); throw propagate(t); }
private ContainerNotFoundException cnfe(final String name) { return new ContainerNotFoundException(name, String.format( "container %s not in %s", name, storageStrategy.getAllContainerNames())); }
@Override public BlobAccess getBlobAccess(String containerName, String blobName) { Map<String, BlobAccess> map = containerToBlobAccess.get(containerName); if (map == null) { throw new ContainerNotFoundException(containerName, "in getBlobAccess"); } BlobAccess access = map.get(blobName); if (access == null) { throw new KeyNotFoundException(containerName, blobName, "in getBlobAccess"); } return access; }
public Object createOrPropagate(Throwable t) throws Exception { if (contains404(checkNotNull(t, "throwable"))) throw new ContainerNotFoundException(t); throw propagate(t); }
public Object createOrPropagate(Throwable t) throws Exception { if (contains404(checkNotNull(t, "throwable"))) throw new ContainerNotFoundException(t); throw propagate(t); } }
@Override 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; } }
@Override public Bucket load(String bucketName) { BucketList list = api.getBucketApi().listBuckets(); for (Bucket bucket : list.buckets()) { if (bucket.bucketName().equals(bucketName)) { return bucket; } } throw new ContainerNotFoundException(bucketName, null); } });
@Override public Bucket load(String bucketName) { BucketList list = api.getBucketApi().listBuckets(); for (Bucket bucket : list.buckets()) { if (bucket.bucketName().equals(bucketName)) { return bucket; } } throw new ContainerNotFoundException(bucketName, null); } });