Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.gui.main.contactlist
Class FilterQuery

java.lang.Object
  extended by net.java.sip.communicator.impl.gui.main.contactlist.FilterQuery
All Implemented Interfaces:
MetaContactQueryListener, ContactQueryListener

public class FilterQuery
extends Object
implements ContactQueryListener, MetaContactQueryListener

The FilterQuery gives information about a current filtering.

Author:
Yana Stamcheva

Field Summary
static int MAX_EXTERNAL_RESULT_COUNT
          The maximum result count for each contact source.
 
Constructor Summary
FilterQuery()
           
 
Method Summary
 void addContactQuery(Object contactQuery)
          Adds the given contactQuery to the list of filterQueries.
 void cancel()
          Cancels this filter query.
 void close()
          Closes this query to indicate that no more contact sub-queries would be added to it.
 void contactReceived(ContactReceivedEvent event)
          Indicates that a contact has been received as a result of a query.
 boolean containsQuery(Object query)
          Verifies if the given query is contained in this filter query.
 boolean isCanceled()
          Indicates if this query is canceled.
 boolean isSucceeded()
          Indicates if this query has succeeded.
 void metaContactQueryStatusChanged(MetaContactQueryStatusEvent event)
          Indicates that a query has changed its status.
 void metaContactReceived(MetaContactQueryEvent event)
          Indicates that a MetaContact has been received for a search in the MetaContactListService.
 void metaGroupReceived(MetaGroupQueryEvent event)
          Indicates that a MetaGroup has been received from a search in the MetaContactListService.
 void queryStatusChanged(ContactQueryStatusEvent event)
          Indicates that a query has changed its status.
 void removeQuery(ContactQuery query)
          Removes the given query from this filter query, updates the related data and notifies interested parties if this was the last query to process.
 void setQueryListener(FilterQueryListener l)
          Sets the given FilterQueryListener.
 void setSucceeded(boolean isSucceeded)
          Sets the isSucceeded property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_EXTERNAL_RESULT_COUNT

public static final int MAX_EXTERNAL_RESULT_COUNT
The maximum result count for each contact source.

See Also:
Constant Field Values
Constructor Detail

FilterQuery

public FilterQuery()
Method Detail

addContactQuery

public void addContactQuery(Object contactQuery)
Adds the given contactQuery to the list of filterQueries.

Parameters:
contactQuery - the ContactQuery to add

setSucceeded

public void setSucceeded(boolean isSucceeded)
Sets the isSucceeded property.

Parameters:
isSucceeded - indicates if this query has succeeded

isSucceeded

public boolean isSucceeded()
Indicates if this query has succeeded.

Returns:
true if this query has succeeded, false - otherwise

isCanceled

public boolean isCanceled()
Indicates if this query is canceled.

Returns:
true if this query is canceled, false otherwise

cancel

public void cancel()
Cancels this filter query.


close

public void close()
Closes this query to indicate that no more contact sub-queries would be added to it.


setQueryListener

public void setQueryListener(FilterQueryListener l)
Sets the given FilterQueryListener.

Parameters:
l - the FilterQueryListener to set

queryStatusChanged

public void queryStatusChanged(ContactQueryStatusEvent event)
Indicates that a query has changed its status.

Specified by:
queryStatusChanged in interface ContactQueryListener
Parameters:
event - the ContactQueryStatusEvent that notified us

removeQuery

public void removeQuery(ContactQuery query)
Removes the given query from this filter query, updates the related data and notifies interested parties if this was the last query to process.

Parameters:
query - the ContactQuery to remove.

metaContactQueryStatusChanged

public void metaContactQueryStatusChanged(MetaContactQueryStatusEvent event)
Indicates that a query has changed its status.

Specified by:
metaContactQueryStatusChanged in interface MetaContactQueryListener
Parameters:
event - the ContactQueryStatusEvent that notified us

containsQuery

public boolean containsQuery(Object query)
Verifies if the given query is contained in this filter query.

Parameters:
query - the query we're looking for
Returns:
true if the given query is contained in this filter query, false - otherwise

contactReceived

public void contactReceived(ContactReceivedEvent event)
Indicates that a contact has been received as a result of a query.

Specified by:
contactReceived in interface ContactQueryListener
Parameters:
event - the ContactReceivedEvent that notified us

metaContactReceived

public void metaContactReceived(MetaContactQueryEvent event)
Description copied from interface: MetaContactQueryListener
Indicates that a MetaContact has been received for a search in the MetaContactListService.

Specified by:
metaContactReceived in interface MetaContactQueryListener
Parameters:
event - the received MetaContactQueryEvent

metaGroupReceived

public void metaGroupReceived(MetaGroupQueryEvent event)
Description copied from interface: MetaContactQueryListener
Indicates that a MetaGroup has been received from a search in the MetaContactListService.

Specified by:
metaGroupReceived in interface MetaContactQueryListener
Parameters:
event - the MetaGroupQueryEvent that has been received

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.