com.openexchange.mail.search
Class SearchUtility

java.lang.Object
  extended by com.openexchange.mail.search.SearchUtility

public final class SearchUtility
extends java.lang.Object

SearchUtility

Author:
Thorben Betten

Method Summary
static SearchTerm<?> parseFields(int[] searchFields, java.lang.String[] patterns, boolean linkWithOR)
          Parses the fields and pattern received from UI into an appropriate instance of SearchTerm.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

parseFields

public static SearchTerm<?> parseFields(int[] searchFields,
                                        java.lang.String[] patterns,
                                        boolean linkWithOR)
Parses the fields and pattern received from UI into an appropriate instance of SearchTerm.

Currently the supported search fields by UI are limited to:

All other are mapped to an instance of BodyTerm to search for certain pattern inside a mail's text body.

Parameters:
searchFields - The search fields as an array of int
patterns - The search patterns
linkWithOR - Whether to link with a logical OR; otherwise to link with a logical AND
Returns:
An appropriate search term