Package com.adobe.testing.s3mock.service
Class BucketService
java.lang.Object
com.adobe.testing.s3mock.service.BucketService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateBucket(String bucketName, boolean objectLockEnabled) Creates a Bucket identified by its name.booleandeleteBucket(String bucketName) voiddeleteBucketLifecycleConfiguration(String bucketName) booleandoesBucketExist(String bucketName) Retrieves a Bucket identified by its name.getBucketLifecycleConfiguration(String bucketName) getObjectLockConfiguration(String bucketName) getS3Objects(String bucketName, String prefix) Retrieves S3Objects from a bucket.booleanisBucketEmpty(String bucketName) listObjectsV1(String bucketName, String prefix, String delimiter, String marker, String encodingType, Integer maxKeys) Deprecated.listObjectsV2(String bucketName, String prefix, String delimiter, String encodingType, String startAfter, Integer maxKeys, String continuationToken) voidsetBucketLifecycleConfiguration(String bucketName, BucketLifecycleConfiguration configuration) voidsetObjectLockConfiguration(String bucketName, ObjectLockConfiguration configuration) voidverifyBucketDoesNotExist(String bucketName) voidverifyBucketExists(String bucketName) voidverifyBucketIsEmpty(String bucketName) voidverifyBucketNameIsAllowed(String bucketName) voidverifyBucketObjectLockEnabled(String bucketName) voidverifyEncodingType(String encodingType) voidverifyMaxKeys(Integer maxKeys)
-
Constructor Details
-
BucketService
-
-
Method Details
-
isBucketEmpty
-
doesBucketExist
-
listBuckets
-
getBucket
Retrieves a Bucket identified by its name.- Parameters:
bucketName- of the Bucket to be retrieved- Returns:
- the Bucket or null if not found
-
createBucket
Creates a Bucket identified by its name.- Parameters:
bucketName- of the Bucket to be created- Returns:
- the Bucket
-
deleteBucket
-
setObjectLockConfiguration
-
getObjectLockConfiguration
-
setBucketLifecycleConfiguration
public void setBucketLifecycleConfiguration(String bucketName, BucketLifecycleConfiguration configuration) -
deleteBucketLifecycleConfiguration
-
getBucketLifecycleConfiguration
-
getS3Objects
Retrieves S3Objects from a bucket.- Parameters:
bucketName- the Bucket in which to list the file(s) in.prefix-Stringobject file name starts with- Returns:
- S3Objects found in bucket for the given prefix
-
listObjectsV2
-
listObjectsV1
@Deprecated public ListBucketResult listObjectsV1(String bucketName, String prefix, String delimiter, String marker, String encodingType, Integer maxKeys) Deprecated. -
verifyBucketExists
-
verifyBucketObjectLockEnabled
-
verifyBucketNameIsAllowed
-
verifyBucketIsEmpty
-
verifyBucketDoesNotExist
-
verifyMaxKeys
-
verifyEncodingType
-