use of com.mendmix.cos.BucketConfig in project jeesuite-libs by vakinge.
the class MinioProvider method getBucketConfig.
@Override
public BucketConfig getBucketConfig(String bucketName) {
if (!existsBucket(bucketName)) {
return null;
}
boolean isPrivate = false;
try {
String bucketPolicy = minioClient.getBucketPolicy(GetBucketPolicyArgs.builder().bucket(bucketName).build());
isPrivate = StringUtils.isEmpty(bucketPolicy) ? true : false;
} catch (Exception e) {
throw new RuntimeException(e);
}
BucketConfig config = new BucketConfig(bucketName, isPrivate, null);
return config;
}
Aggregations