微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

com.amazonaws.services.s3.model.lifecycle.LifecycleFilterPredicate的实例源码

项目:nexus-blobstore-s3    文件S3BlobStore.java   
boolean isExpirationLifecycleConfigurationPresent(BucketLifecycleConfiguration lifecycleConfiguration) {
  return lifecycleConfiguration != null &&
      lifecycleConfiguration.getRules() != null &&
      lifecycleConfiguration.getRules().stream()
      .filter(r -> r.getExpirationInDays() == getConfiguredExpirationInDays())
      .filter(r -> {
        LifecycleFilterPredicate predicate = r.getFilter().getPredicate();
        if (predicate instanceof LifecycleTagPredicate) {
          LifecycleTagPredicate tagPredicate = (LifecycleTagPredicate) predicate;
          return DELETED_TAG.equals(tagPredicate.getTag());
        }
        return false;
      })
      .findAny().isPresent();
}
项目:ibm-cos-sdk-java    文件BucketConfigurationXmlFactory.java   
@Override
public void visit(LifecycleAndOperator lifecycleAndOperator) {
    xml.start("And");
    for (LifecycleFilterPredicate predicate : lifecycleAndOperator.getoperands()) {
        predicate.accept(this);
    }
    xml.end(); // </And>
}
项目:ibm-cos-sdk-java    文件XmlResponsesSaxParser.java   
@Override
protected void doStartElement(
        String uri,String name,String qName,Attributes attrs) {

    if (in("LifecycleConfiguration")) {
        if (name.equals("Rule")) {
            currentRule = new Rule();
        }
    } else if (in("LifecycleConfiguration","Rule")) {
        if (name.equals("Transition")) {
            currentTransition = new Transition();
        } else if (name.equals("NoncurrentVersionTransition")) {
            currentNcvTransition = new NoncurrentVersionTransition();
        } else if (name.equals("AbortIncompleteMultipartUpload")) {
            abortIncompleteMultipartUpload = new
                    AbortIncompleteMultipartUpload();
        } else if (name.equals("Filter")) {
            currentFilter = new LifecycleFilter();
        }
    } else if (in("LifecycleConfiguration","Rule","Filter")) {
        if (name.equals("And")) {
            andOperandsList = new ArrayList<LifecycleFilterPredicate>();
        }
    }
}
项目:nexus-public    文件S3BlobStore.java   
boolean isExpirationLifecycleConfigurationPresent(BucketLifecycleConfiguration lifecycleConfiguration) {
  return lifecycleConfiguration != null &&
      lifecycleConfiguration.getRules() != null &&
      lifecycleConfiguration.getRules().stream()
      .filter(r -> r.getExpirationInDays() == getConfiguredExpirationInDays())
      .anyMatch(r -> {
        LifecycleFilterPredicate predicate = r.getFilter().getPredicate();
        if (predicate instanceof LifecycleTagPredicate) {
          LifecycleTagPredicate tagPredicate = (LifecycleTagPredicate) predicate;
          return DELETED_TAG.equals(tagPredicate.getTag());
        }
        return false;
      });
}
项目:ibm-cos-sdk-java    文件BucketConfigurationXmlFactory.java   
private void writeLifecycleFilterPredicate(XmlWriter xml,LifecycleFilterPredicate predicate) {
    if (predicate == null) {
        return;
    }
    predicate.accept(new LifecyclePredicateVisitorImpl(xml));
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。