|
|
|
|
@ -48,10 +48,12 @@ public void applyFilter(FilterQuery filterQuery)
|
|
|
|
|
= contactSource.getContactSourceService()
|
|
|
|
|
.createContactQuery("", 50);
|
|
|
|
|
|
|
|
|
|
filterQuery.addContactQuery(query);
|
|
|
|
|
|
|
|
|
|
query.start();
|
|
|
|
|
|
|
|
|
|
filterQuery.addContactQuery(query);
|
|
|
|
|
|
|
|
|
|
addMatching(query.getQueryResults(), contactSource);
|
|
|
|
|
|
|
|
|
|
// We know that this query should be finished here and we do not
|
|
|
|
|
// expect any further results from it.
|
|
|
|
|
filterQuery.removeQuery(query);
|
|
|
|
|
@ -123,4 +125,26 @@ private void addMatching(NotificationContactSource notifSource)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Adds matching <tt>sourceContacts</tt> to the result tree model.
|
|
|
|
|
*
|
|
|
|
|
* @param sourceContacts the list of <tt>SourceContact</tt>s to add
|
|
|
|
|
* @param uiSource the <tt>ExternalContactSource</tt>, which contacts
|
|
|
|
|
* we're adding
|
|
|
|
|
*/
|
|
|
|
|
private void addMatching( List<SourceContact> sourceContacts,
|
|
|
|
|
UIContactSource uiSource)
|
|
|
|
|
{
|
|
|
|
|
Iterator<SourceContact> contactsIter = sourceContacts.iterator();
|
|
|
|
|
|
|
|
|
|
while (contactsIter.hasNext())
|
|
|
|
|
{
|
|
|
|
|
GuiActivator.getContactList().addContact(
|
|
|
|
|
uiSource.createUIContact(contactsIter.next()),
|
|
|
|
|
uiSource.getUIGroup(),
|
|
|
|
|
false,
|
|
|
|
|
true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|