org.eclipse.ecf.presence.search
Interface IUserSearchManager

All Known Implementing Classes:
AbstractUserSearchManager

public interface IUserSearchManager

Get a search mechanism for an account.

Since:
2.0

Method Summary
 ICriteria createCriteria()
          Create a specific criteria for the provider.
 IRestriction createRestriction()
          Create a specific IRestriction implementation for the provider.
 java.lang.String[] getUserPropertiesFields()
          Each provider can inform the user properties fields to be considered on the user search, allowing the dynamically user interface for the search.
 boolean isEnabled()
          Whether this handler is capable of executing at this time.
 ISearch search(ICriteria criteria)
          Execute the search for a specific criteria, blocking until the search returns.
 void search(ICriteria criteria, IUserSearchListener listener)
          Execute the search for a specific criteria, not blocking until the search returns.
 

Method Detail

search

ISearch search(ICriteria criteria)
               throws UserSearchException
Execute the search for a specific criteria, blocking until the search returns. This method can apply search to match the specific criteria in case if the provider is not able to do it completely

Parameters:
criteria - Will not be null.
Returns:
ISearch Contain the search results
Throws:
UserSearchException

search

void search(ICriteria criteria,
            IUserSearchListener listener)
Execute the search for a specific criteria, not blocking until the search returns. This method can apply search to match the specific criteria in case if the provider is not able to do it completely. The provider is free to call the methods below with an arbitrary thread, so the implementation of these methods must be appropriately prepared.

Parameters:
criteria - ICriteria. Must not be null.
listener - the listener IUserSearchListener to search. Must not be null.

createCriteria

ICriteria createCriteria()
Create a specific criteria for the provider. Each provider must implement a specific Criteria in a convenient approach for keep, organize and deal with the ICriterion.

Returns:
ICriteria Will not be null

createRestriction

IRestriction createRestriction()
Create a specific IRestriction implementation for the provider. This implementation will provide the methods to created and organize the ICriterion that composes the search. The Restriction is a simple implementation of this, but subclasses or new implementation may be created as appropriate.

Returns:
IRestriction Will not be null

getUserPropertiesFields

java.lang.String[] getUserPropertiesFields()
                                           throws ECFException
Each provider can inform the user properties fields to be considered on the user search, allowing the dynamically user interface for the search. This method can be executed in a block way, it depends of the implementation on provider side.

Returns:
String[] user properties provides by server
Throws:
ECFException - thrown if request cannot be sent (e.g. because disconnect) or provider doesn't inform the field's that composite the user interface

isEnabled

boolean isEnabled()
Whether this handler is capable of executing at this time. It is a way to inform if the provider allows user search.

Returns:
boolean