com.openexchange.messaging
Interface SearchTerm<T>

All Superinterfaces:
java.io.Serializable

public interface SearchTerm<T>
extends java.io.Serializable

SearchTerm - A search term.

Since:
Open-Xchange v6.16
Author:
Thorben Betten

Method Summary
 void addMessagingField(java.util.Collection<MessagingField> col)
          Adds the addressed MailField to specified collection.
 T getPattern()
          Gets the pattern to which the expression should match.
 boolean matches(MessagingMessage msg)
          Checks if given message matches this search term.
 

Method Detail

getPattern

T getPattern()
Gets the pattern to which the expression should match.

Returns:
The pattern

addMessagingField

void addMessagingField(java.util.Collection<MessagingField> col)
Adds the addressed MailField to specified collection.

Parameters:
col - The collection which gathers addressed fields

matches

boolean matches(MessagingMessage msg)
                throws MessagingException
Checks if given message matches this search term.

Parameters:
msg - The message to check
Returns:
true if message matches this search term; otherwise false
Throws:
MessagingException - If check fails