Class SearchTermHelpers

java.lang.Object
org.jenkinsci.plugins.pollmailboxtrigger.mail.utils.SearchTermHelpers

public final class SearchTermHelpers extends Object
A slightly nicer way of building search terms.
Author:
Nick Grealy
  • Method Summary

    Modifier and Type
    Method
    Description
    static javax.mail.search.SearchTerm
    and(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(String email)
     
    static javax.mail.search.SearchTerm
    not(javax.mail.search.SearchTerm term)
     
    static javax.mail.search.SearchTerm
     
    static Date
    relativeDate(int unit, int amount)
     
    static javax.mail.search.SearchTerm
    subject(String containsCaseInsensitive)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • and

      public static javax.mail.search.SearchTerm and(javax.mail.search.SearchTerm... terms)
    • and

      public static javax.mail.search.SearchTerm and(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(String containsCaseInsensitive)
    • from

      public static javax.mail.search.SearchTerm from(String email)
    • receivedSince

      public static javax.mail.search.SearchTerm receivedSince(Date date)
    • flag

      public static javax.mail.search.SearchTerm flag(javax.mail.Flags.Flag flag)
    • relativeDate

      public static Date relativeDate(int unit, int amount)
      Parameters:
      unit - - e.g. Calendar.HOURS
      amount - - negative for the past!
      Returns:
      The past date.