public abstract class BaseEmailPredicateBuilder extends Object
Predicates that verify that a BaseEmailAttributes instance is compliant with a
number of criteria. Builder implementation of this class are stateful and not thread-safe. A new instance should be
use per each desired Predicate.
Builder implementations can either be used programmatically or through Mule's SDK since its internal state is
annotated with the Parameter annotation.
Criterias are evaluated using an AND operator, meaning that for the predicate to accept a file, ALL the criterias must
be complied with.
None of the criteria fields are mandatory. If a particular criteria is not specified, then it's simply not applied on the evaluation.
| Constructor and Description |
|---|
BaseEmailPredicateBuilder() |
| Modifier and Type | Method and Description |
|---|---|
Predicate<BaseEmailAttributes> |
build()
Builds a
Predicate from the criterias in this builder's state. |
protected Predicate<? extends BaseEmailAttributes> |
getBasePredicate() |
String |
getFromRegex() |
LocalDateTime |
getReceivedSince() |
LocalDateTime |
getReceivedUntil() |
LocalDateTime |
getSentSince() |
LocalDateTime |
getSentUntil() |
String |
getSubjectRegex() |
BaseEmailPredicateBuilder |
setFromRegex(String fromRegex) |
BaseEmailPredicateBuilder |
setReceivedSince(LocalDateTime receivedSince) |
BaseEmailPredicateBuilder |
setReceivedUntil(LocalDateTime receivedUntil) |
BaseEmailPredicateBuilder |
setSentSince(LocalDateTime sentSince) |
BaseEmailPredicateBuilder |
setSentUntil(LocalDateTime sentUntil) |
BaseEmailPredicateBuilder |
setSubjectRegex(String subjectRegex) |
public Predicate<BaseEmailAttributes> build()
Predicate from the criterias in this builder's state.Predicatepublic LocalDateTime getReceivedSince()
public LocalDateTime getReceivedUntil()
public LocalDateTime getSentSince()
public LocalDateTime getSentUntil()
public String getSubjectRegex()
public String getFromRegex()
protected Predicate<? extends BaseEmailAttributes> getBasePredicate()
public BaseEmailPredicateBuilder setFromRegex(String fromRegex)
public BaseEmailPredicateBuilder setReceivedSince(LocalDateTime receivedSince)
public BaseEmailPredicateBuilder setReceivedUntil(LocalDateTime receivedUntil)
public BaseEmailPredicateBuilder setSubjectRegex(String subjectRegex)
public BaseEmailPredicateBuilder setSentSince(LocalDateTime sentSince)
public BaseEmailPredicateBuilder setSentUntil(LocalDateTime sentUntil)
Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.