com.amazonaws.services.s3.model.lifecycle.LifecycleAndOperator Java Examples
The following examples show how to use
com.amazonaws.services.s3.model.lifecycle.LifecycleAndOperator.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BucketManager.java From nexus-public with Eclipse Public License 1.0 | 5 votes |
private boolean isDeletedTagPredicate(final LifecycleFilterPredicate filterPredicate, final String bucketPrefix) { if (filterPredicate instanceof LifecycleTagPredicate) { LifecycleTagPredicate tagPredicate = (LifecycleTagPredicate) filterPredicate; return S3BlobStore.DELETED_TAG.equals(tagPredicate.getTag()); } else if (filterPredicate instanceof LifecycleAndOperator) { LifecycleAndOperator andOperator = (LifecycleAndOperator) filterPredicate; return andOperator.getOperands().stream().anyMatch(op -> isDeletedTagPredicate(op, bucketPrefix)) && andOperator.getOperands().stream().anyMatch(op -> isBucketPrefixPredicate(op, bucketPrefix)); } else { return false; } }