public class SearchFilter extends java.lang.Object implements ContactListSearchFilter
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
DISABLE_CALL_HISTORY_SEARCH_PROP
The name of the property indicating if searches in call history are
enabled.
|
protected java.util.regex.Pattern |
filterPattern
The pattern to filter.
|
protected java.lang.String |
filterString
The string, which we're searching.
|
protected ContactList |
sourceContactList
The source contact list.
|
Constructor and Description |
---|
SearchFilter(ContactList sourceContactList)
Creates an instance of SearchFilter.
|
SearchFilter(MetaContactListSource contactListSource)
Creates an instance of SearchFilter.
|
Modifier and Type | Method and Description |
---|---|
void |
applyFilter(FilterQuery filterQuery)
Applies this filter to the default contact source.
|
protected ContactQuery |
applyFilter(UIContactSource contactSource,
FilterQuery filterQuery)
Applies this filter to the given contactSource.
|
boolean |
isMatching(UIContact uiContact)
Indicates if the given uiGroup matches this filter.
|
boolean |
isMatching(UIGroup uiGroup)
For all groups we return false.
|
void |
setFilterString(java.lang.String filter)
Creates the SearchFilter by specifying the string used for
filtering.
|
protected java.lang.String filterString
protected java.util.regex.Pattern filterPattern
protected ContactList sourceContactList
protected java.lang.String DISABLE_CALL_HISTORY_SEARCH_PROP
public SearchFilter(MetaContactListSource contactListSource)
public SearchFilter(ContactList sourceContactList)
public void applyFilter(FilterQuery filterQuery)
applyFilter
in interface ContactListFilter
filterQuery
- the query that tracks this filter.protected ContactQuery applyFilter(UIContactSource contactSource, FilterQuery filterQuery)
contactSource
- the ExternalContactSource to apply the
filter tofilterQuery
- the filter query object.public boolean isMatching(UIContact uiContact)
isMatching
in interface ContactListFilter
uiContact
- the UIGroup to checkpublic boolean isMatching(UIGroup uiGroup)
isMatching
in interface ContactListFilter
uiGroup
- the UIGroup to checkpublic void setFilterString(java.lang.String filter)
setFilterString
in interface ContactListSearchFilter
filter
- the String used for filtering
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.