@Override public void deleteObject(String bucketName, String key) throws SdkClientException, AmazonServiceException { deleteObject(new DeleteObjectRequest(bucketName, key)); }
@Override public void deleteObject(String bucketName, String key) throws SdkClientException, AmazonServiceException { deleteObject(new DeleteObjectRequest(bucketName, key)); }
/** * Delete a file from S3 Storage. * * @param bucket * The name of the bucket * @param key * The record key of the file to delete. * @return OK on success, otherwise ERROR. See the * {@link DB} class's description for a discussion of error codes. */ @Override public Status delete(String bucket, String key) { try { s3Client.deleteObject(new DeleteObjectRequest(bucket, key)); } catch (Exception e){ System.err.println("Not possible to delete the key "+key); e.printStackTrace(); return Status.ERROR; } return Status.OK; } /**
@Override public void delete( UUID appId, Entity entity ) throws Exception { getS3Client().deleteObject(new DeleteObjectRequest(bucketName, AssetUtils.buildAssetKey( appId, entity ))); } }
final DeleteObjectRequest r = new DeleteObjectRequest(bucket, key);
@Override public void deleteObject(String bucketName, String key) throws AmazonClientException, AmazonServiceException { deleteObject(new DeleteObjectRequest(bucketName, key)); }
/** * Creates a delete request to delete an instruction file in S3. * * @param request The delete request for the original object to be deleted * from S3. * @return A delete request to delete an instruction file in S3. */ public static DeleteObjectRequest createInstructionDeleteObjectRequest( DeleteObjectRequest request) { return new DeleteObjectRequest(request.getBucketName(), request.getKey() + INSTRUCTION_SUFFIX); }
@Override public void remove(String projectName) { DeleteObjectRequest del = new DeleteObjectRequest( bucketName, projectName ); s3.deleteObject(del); }
@Override public Object call() throws IOException { getS3Client().deleteObject(new DeleteObjectRequest(bucket, key)); return null; } });
@Override public void deleteObject(String bucketName, String key) throws AmazonClientException, AmazonServiceException { deleteObject(new DeleteObjectRequest(bucketName, key)); }
@Override public void deleteObject(String bucketName, String key) throws SdkClientException, AmazonServiceException { deleteObject(new DeleteObjectRequest(bucketName, key)); }
@Override protected void doRemove(String fullPath) { s3.deleteObject(new DeleteObjectRequest(bucket, fullPath)); }
@Override public void deleteObject(String bucketName, String key) throws SdkClientException, AmazonServiceException { deleteObject(new DeleteObjectRequest(bucketName, key)); }
/** * Creates a delete request to delete an instruction file in S3. * * @param request The delete request for the original object to be deleted * from S3. * @return A delete request to delete an instruction file in S3. */ public static DeleteObjectRequest createInstructionDeleteObjectRequest( DeleteObjectRequest request) { return new DeleteObjectRequest(request.getBucketName(), request.getKey() + INSTRUCTION_SUFFIX); }
@Override public void delete() throws IOException { open(); if (key == null) { throw new IOException("Delete called with null key"); } try { DeleteObjectRequest deleteObjRequest = new DeleteObjectRequest(bucketName, key); s3.deleteObject(deleteObjRequest); } catch (AmazonClientException ase) { logger.warning("Caught an AmazonClientException in S3AccessIO.delete(): " + ase.getMessage()); throw new IOException("Failed to delete object" + dvObject.getId()); } }
public void removeFile(final String linkToFile) throws ServiceException { try { getAmazonType().getAmazonS3().deleteObject( new DeleteObjectRequest(getAmazonType().getS3Bucket(), new URL(linkToFile).getPath().substring(1))); } catch (MalformedURLException e) { throw new ServiceException(e); } }
/** * Delete some artifacts of a given run * @param build * @param artifact */ public void delete(Run build, FingerprintRecord record) { Destination dest = Destination.newFromRun(build, record.artifact); DeleteObjectRequest req = new DeleteObjectRequest(dest.bucketName, dest.objectName); getClient().deleteObject(req); }
@Override public void deleteAuxObject(String auxItemTag) throws IOException { if (!this.canWrite()) { open(DataAccessOption.WRITE_ACCESS); } String destinationKey = getDestinationKey(auxItemTag); try { DeleteObjectRequest dor = new DeleteObjectRequest(bucketName, destinationKey); s3.deleteObject(dor); } catch (AmazonClientException ase) { logger.warning("S3AccessIO: Unable to delete object " + ase.getMessage()); } }
@Override public void deleteProduct(Product product) throws DataTransferException, IOException { for (Reference ref : product.getProductReferences()) { DeleteObjectRequest request = new DeleteObjectRequest(bucketName, stripProtocol( ref.getDataStoreReference(), true)); try { s3Client.deleteObject(request); } catch (AmazonClientException e) { throw new DataTransferException(String.format( "Failed to delete product reference %s from S3", ref.getDataStoreReference()), e); } } }
@Override public void deleteProduct(Product product) throws DataTransferException, IOException { for (Reference ref : product.getProductReferences()) { DeleteObjectRequest request = new DeleteObjectRequest(bucketName, stripProtocol( ref.getDataStoreReference(), true)); try { s3Client.deleteObject(request); } catch (AmazonClientException e) { throw new DataTransferException(String.format( "Failed to delete product reference %s from S3", ref.getDataStoreReference()), e); } } }