org.jenkinsci.plugins.pollmailboxtrigger.mail.utils
Class SearchTermHelpers
java.lang.Object
org.jenkinsci.plugins.pollmailboxtrigger.mail.utils.SearchTermHelpers
public final class SearchTermHelpers
- extends java.lang.Object
A slightly nicer way of building search terms.
Method Summary |
static javax.mail.search.SearchTerm |
and(java.util.List<javax.mail.search.SearchTerm> terms)
|
static javax.mail.search.SearchTerm |
and(javax.mail.search.SearchTerm... terms)
|
static javax.mail.search.SearchTerm |
flag(javax.mail.Flags.Flag flag)
|
static javax.mail.search.SearchTerm |
from(java.lang.String email)
|
static javax.mail.search.SearchTerm |
not(javax.mail.search.SearchTerm term)
|
static javax.mail.search.SearchTerm |
receivedSince(java.util.Date date)
|
static java.util.Date |
relativeDate(int unit,
int amount)
|
static javax.mail.search.SearchTerm |
subject(java.lang.String containsCaseInsensitive)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
and
public static javax.mail.search.SearchTerm and(javax.mail.search.SearchTerm... terms)
and
public static javax.mail.search.SearchTerm and(java.util.List<javax.mail.search.SearchTerm> terms)
not
public static javax.mail.search.SearchTerm not(javax.mail.search.SearchTerm term)
subject
public static javax.mail.search.SearchTerm subject(java.lang.String containsCaseInsensitive)
from
public static javax.mail.search.SearchTerm from(java.lang.String email)
receivedSince
public static javax.mail.search.SearchTerm receivedSince(java.util.Date date)
flag
public static javax.mail.search.SearchTerm flag(javax.mail.Flags.Flag flag)
relativeDate
public static java.util.Date relativeDate(int unit,
int amount)
- Parameters:
unit
- - e.g. Calendar.HOURSamount
- - negative for the past!
- Returns:
- The past date.