public void delete(String path) { try { m_s3service.deleteObject(BUCKET, path); m_logger.trace("DeleteObject: {}", path); } catch (Exception e) { throw new RuntimeException(e); } } }
@Override public void delete(String key) throws IOException { try { LOG.debug("Deleting key: {} from bucket: {}", key, bucket.getName()); s3Service.deleteObject(bucket, key); } catch (ServiceException e) { handleException(e, key); } }
/** * * @param containerName * @param objectName * @throws StorageCommunicationException * @see org.opencredo.cloud.storage.StorageOperations#deleteObject(java.lang.String, * java.lang.String) */ public void deleteObject(String containerName, String objectName) throws StorageCommunicationException { Assert.notNull(containerName, "Bucket name cannot be null"); LOG.debug("Delete object '{}' in bucket '{}'", objectName, containerName); try { s3Service.deleteObject(new S3Bucket(containerName), objectName); } catch (S3ServiceException e) { throw new StorageCommunicationException("Bucket deletion problem", e); } }
public void run() { try { if (signedDeleteUrl == null) { s3Service.deleteObject(bucket, object.getKey()); result = object; } else { SignedUrlHandler handler = s3Service; handler.deleteObjectWithSignedUrl(signedDeleteUrl); URL url = new URL(signedDeleteUrl); result = ServiceUtils.buildObjectFromUrl( url.getHost(), url.getPath(), s3Service.getEndpoint()); } } catch (RuntimeException e) { result = e; throw e; } catch (Exception e) { result = e; } }
public void run() { try { if (signedDeleteUrl == null) { s3Service.deleteObject(bucket, object.getKey()); result = object; } else { SignedUrlHandler handler = s3Service; handler.deleteObjectWithSignedUrl(signedDeleteUrl); URL url = new URL(signedDeleteUrl); result = ServiceUtils.buildObjectFromUrl( url.getHost(), url.getPath(), s3Service.getEndpoint()); } } catch (RuntimeException e) { result = e; throw e; } catch (Exception e) { result = e; } }
private void delete(String key) throws IOException { try { s3Service.deleteObject(bucket, key); } catch (S3ServiceException e) { if (e.getCause() instanceof IOException) { throw (IOException) e.getCause(); } throw new S3Exception(e); } }
public void delete(String key) throws IOException { try { s3Service.deleteObject(bucket, key); } catch (S3ServiceException e) { if (e.getCause() instanceof IOException) { throw (IOException) e.getCause(); } throw new S3Exception(e); } }
private void delete(String key) throws IOException { try { s3Service.deleteObject(bucket, key); } catch (S3ServiceException e) { if (e.getCause() instanceof IOException) { throw (IOException) e.getCause(); } throw new S3Exception(e); } }
private void delete(String key) throws IOException { try { s3Service.deleteObject(bucket, key); } catch (S3ServiceException e) { if (e.getCause() instanceof IOException) { throw (IOException) e.getCause(); } throw new S3Exception(e); } }
private void delete(String key) throws IOException { try { s3Service.deleteObject(bucket, key); } catch (S3ServiceException e) { if (e.getCause() instanceof IOException) { throw (IOException) e.getCause(); } throw new S3Exception(e); } }
private void delete(String key) throws IOException { try { s3Service.deleteObject(bucket, key); } catch (S3ServiceException e) { if (e.getCause() instanceof IOException) { throw (IOException) e.getCause(); } throw new S3Exception(e); } }
public void delete(String key) throws IOException { try { s3Service.deleteObject(bucket, key); } catch (S3ServiceException e) { if (e.getCause() instanceof IOException) { throw (IOException) e.getCause(); } throw new S3Exception(e); } }
private void delete(String key) throws IOException { try { s3Service.deleteObject(bucket, key); } catch (S3ServiceException e) { if (e.getCause() instanceof IOException) { throw (IOException) e.getCause(); } throw new S3Exception(e); } }
@Override public void purge(String prefix) throws IOException { String key = ""; try { S3Object[] objects = s3Service.listObjects(bucket.getName(), prefix, null); for (S3Object object : objects) { key = object.getKey(); s3Service.deleteObject(bucket, key); } } catch (S3ServiceException e) { handleException(e, key); } }
public void purge(String prefix) throws IOException { try { S3Object[] objects = s3Service.listObjects(bucket, prefix, null); for (int i = 0; i < objects.length; i++) { s3Service.deleteObject(bucket, objects[i].getKey()); } } catch (S3ServiceException e) { if (e.getCause() instanceof IOException) { throw (IOException) e.getCause(); } throw new S3Exception(e); } }
public void purge(String prefix) throws IOException { try { S3Object[] objects = s3Service.listObjects(bucket, prefix, null); for (int i = 0; i < objects.length; i++) { s3Service.deleteObject(bucket, objects[i].getKey()); } } catch (S3ServiceException e) { if (e.getCause() instanceof IOException) { throw (IOException) e.getCause(); } throw new S3Exception(e); } }
/** * Deletes an object from a bucket in S3. * <p> * This method can be performed by anonymous services. Anonymous services * can delete objects from publicly-writable buckets. * * @param bucket * the bucket containing the object to be deleted. * @param objectKey * the key representing the object in S3. * @throws S3ServiceException */ public void deleteObject(S3Bucket bucket, String objectKey) throws S3ServiceException { try { assertValidBucket(bucket, "deleteObject"); assertValidObject(objectKey, "deleteObject"); deleteObject(bucket.getName(), objectKey); } catch (ServiceException se) { throw new S3ServiceException(se); } }
public void purge() throws IOException { try { S3Object[] objects = s3Service.listObjects(bucket); for (int i = 0; i < objects.length; i++) { s3Service.deleteObject(bucket, objects[i].getKey()); } } catch (S3ServiceException e) { if (e.getCause() instanceof IOException) { throw (IOException) e.getCause(); } throw new S3Exception(e); } }
public void purge() throws IOException { try { S3Object[] objects = s3Service.listObjects(bucket); for (int i = 0; i < objects.length; i++) { s3Service.deleteObject(bucket, objects[i].getKey()); } } catch (S3ServiceException e) { if (e.getCause() instanceof IOException) { throw (IOException) e.getCause(); } throw new S3Exception(e); } }
@Override public void purge() throws IOException { try { S3Object[] objects = s3Service.listObjects(bucket.getName()); for (int i = 0; i < objects.length; i++) { s3Service.deleteObject(bucket, objects[i].getKey()); } } catch (S3ServiceException e) { if (e.getCause() instanceof IOException) { throw (IOException) e.getCause(); } throw new S3Exception(e); } }