/** * Delete multiple object versions from a bucket in S3, and sends * {@link DeleteVersionedObjectsEvent} notification events. This will delete only the specific * version identified and will not affect any other Version or DeleteMarkers related to * the object. * <p> * The maximum number of threads is controlled by the JetS3t configuration property * <tt>s3service.admin-max-thread-count</tt>. * * @param versionIds * the identifiers of the object versions that will be deleted. * @param bucketName * the name of the versioned bucket containing the object to be deleted. * @param objectKey * the key representing the object in S3. * * @return * true if all the threaded tasks completed successfully, false otherwise. */ public boolean deleteVersionsOfObject(final String[] versionIds, String bucketName, String objectKey) { return deleteVersionsOfObjectWithMFA(versionIds, null, null, bucketName, objectKey); }
/** * Delete multiple object versions from a bucket in S3, and sends * {@link DeleteVersionedObjectsEvent} notification events. This will delete only the specific * version identified and will not affect any other Version or DeleteMarkers related to * the object. * <p> * The maximum number of threads is controlled by the JetS3t configuration property * <tt>s3service.admin-max-thread-count</tt>. * * @param versionIds * the identifiers of the object versions that will be deleted. * @param bucketName * the name of the versioned bucket containing the object to be deleted. * @param objectKey * the key representing the object in S3. * * @return * true if all the threaded tasks completed successfully, false otherwise. */ public boolean deleteVersionsOfObject(final String[] versionIds, String bucketName, String objectKey) { return deleteVersionsOfObjectWithMFA(versionIds, null, null, bucketName, objectKey); }
/** * Deletes multiple versions. * * @param versionIds * the identifiers of the object versions that will be deleted. * @param multiFactorSerialNumber * the serial number for a multi-factor authentication device. * @param multiFactorAuthCode * a multi-factor authentication code generated by a device. * @param bucketName * the name of the versioned bucket containing the object to be deleted. * @param objectKey * the key representing the object in S3. * * @throws S3ServiceException */ public void deleteVersionsOfObjectWithMFA(final String[] versionIds, String multiFactorSerialNumber, String multiFactorAuthCode, String bucketName, String objectKey) throws S3ServiceException { S3ServiceEventAdaptor adaptor = new S3ServiceEventAdaptor(); (new S3ServiceMulti(s3Service, adaptor)).deleteVersionsOfObjectWithMFA( versionIds, multiFactorSerialNumber, multiFactorAuthCode, bucketName, objectKey); throwError(adaptor); }
/** * Deletes multiple versions. * * @param versionIds * the identifiers of the object versions that will be deleted. * @param multiFactorSerialNumber * the serial number for a multi-factor authentication device. * @param multiFactorAuthCode * a multi-factor authentication code generated by a device. * @param bucketName * the name of the versioned bucket containing the object to be deleted. * @param objectKey * the key representing the object in S3. * * @throws S3ServiceException */ public void deleteVersionsOfObjectWithMFA(final String[] versionIds, String multiFactorSerialNumber, String multiFactorAuthCode, String bucketName, String objectKey) throws S3ServiceException { S3ServiceEventAdaptor adaptor = new S3ServiceEventAdaptor(); (new S3ServiceMulti(s3Service, adaptor)).deleteVersionsOfObjectWithMFA( versionIds, multiFactorSerialNumber, multiFactorAuthCode, bucketName, objectKey); throwError(adaptor); }