|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.unifiedsearch.UnifiedSearchServices
public abstract class UnifiedSearchServices
Provides services for an application to initiate a search in the Unified Search Framework.
Method Summary | ||
---|---|---|
|
abstract Vector |
getDeviceSearchables(long contentType)
Returns a list of local (on-device) Searchable data sources for the content type specified. |
|
static UnifiedSearchServices |
getInstance()
Returns an instance of UnifiedSearchServices . |
|
abstract Vector |
getSearchProviders(long contentType)
Returns a set of external (off-device) ExternalSearchProvider objects for the content type specified
and SearchableContentTypeConstants.CONTENT_TYPE_WEB_DEFAULT . |
|
abstract boolean |
isIndexingCompleted()
Indicates whether or not all registered data sources have been indexed. |
|
abstract void |
removeAllData(RegistrationToken token)
Removes all SearchableEntity objects associated with a data source. |
|
abstract SearchResponse |
search(String keywords)
Performs a blocking search on all available Searchable sources. |
|
abstract SearchResponse |
search(String keywords,
Searchable searchable)
Performs a blocking search on the Searchable source specified. |
|
abstract SearchResponse |
search(String keywords,
Searchable[] searchables)
Performs a blocking search on the Searchable sources specified. |
|
abstract SearchResponse |
search(String keywords,
Searchable[] searchables,
SearchField[][] fields)
Performs a blocking search on the Searchable sources specified, using the
SearchField objects specified. |
|
abstract SearchResponse |
search(String[] phrases)
Performs a blocking search on all available Searchable sources. |
|
abstract SearchResponse |
search(String[] phrases,
Searchable searchable)
Performs a blocking search on the Searchable source specified. |
|
abstract SearchResponse |
search(String[] phrases,
Searchable[] searchables)
Performs a blocking search on the Searchable sources specified. |
|
abstract SearchResponse |
search(String[] phrases,
Searchable[] searchables,
SearchField[][] fields)
Performs a blocking search on the Searchable sources specified, using the
SearchField objects specified. |
|
abstract void |
setDataSourceComparator(RegistrationToken token,
Comparator cmp)
Sets a Comparator to be used when sorting data items in the data source associated with the RegistrationToken. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static final UnifiedSearchServices getInstance()
UnifiedSearchServices
.
UnifiedSearchServices
instance.public abstract Vector getDeviceSearchables(long contentType)
Searchable
data sources for the content type specified.
contentType
- The content type is a mask of SearchableContentTypeConstants
.
Vector
of Searchable
objects.public abstract Vector getSearchProviders(long contentType)
ExternalSearchProvider
objects for the content type specified
and SearchableContentTypeConstants.CONTENT_TYPE_WEB_DEFAULT
.
contentType
- See SearchableContentTypeConstants
.
Vector
of ExternalSearchProvider
objects.public abstract boolean isIndexingCompleted()
true
, if indexing of data sources is complete; otherwise, false
.public abstract SearchResponse search(String keywords, Searchable[] searchables, SearchField[][] fields) throws Exception
Searchable
sources specified, using the
SearchField
objects specified.
keywords
- The search keywords. Individual keywords are combined using a logical AND operation.searchables
- An array of Searchable
objects, or null
if the search
should inspect all available Searchable
sources. Retrieve Searchable
data sources
by calling getDeviceSearchables
.fields
- A two-dimensional array that specifies what fields to search in
each Searchable
data source.
The first dimension should correspond to elements in the searchables
array that have the
the desired search fields.
Use null
if you want to search all fields.
Exception
- If any error occurs during a search. For example, an exception would
be thrown if a given SearchField
is not found
in the Searchable
to which the search
request assigned it.public abstract SearchResponse search(String keywords, Searchable[] searchables) throws Exception
Searchable
sources specified.
keywords
- The search keywords. Individual keywords are combined using a logical AND operation.searchables
- An array of Searchable
objects, or null
if the search
should inspect all available Searchable
sources. Retrieve Searchable
data sources
by calling getDeviceSearchables
.
Exception
- If any error occurs during a search.public abstract SearchResponse search(String keywords, Searchable searchable) throws Exception
Searchable
source specified.
keywords
- The search keywords. Individual keywords are combined using a logical AND operation.searchable
- A Searchable
object, or null
if the search
should inspect all available Searchable
sources. Retrieve Searchable
data sources
by calling getDeviceSearchables
.
Exception
- If any error occurs during a search.public abstract SearchResponse search(String keywords) throws Exception
Searchable
sources.
keywords
- The search keywords. Individual keywords are combined using a logical AND operation.
Exception
- If any error occurs during a search.public abstract SearchResponse search(String[] phrases, Searchable[] searchables, SearchField[][] fields) throws Exception
Searchable
sources specified, using the
SearchField
objects specified.
phrases
- The search keyword phrases. Individual keywords in each
phrase are combined using a logical AND operation; results for entire phrases are
combined using a logical OR operation.searchables
- An array of Searchable
objects, or null
if the search
should inspect all available Searchable
sources. Retrieve Searchable
data sources
by calling getDeviceSearchables
.fields
- A two-dimensional array that specifies what fields to search in
each Searchable
data source.
The first dimension should correspond to elements in the searchables
array that have the
the desired search fields.
Use null
if you want to search all fields.
Exception
- If any error occurs during a search. For example, an exception would
be thrown if a given SearchField
is not found
in the Searchable
to which the search
request assigned it.public abstract SearchResponse search(String[] phrases, Searchable[] searchables) throws Exception
Searchable
sources specified.
phrases
- The search keyword phrases. Individual keywords in each
phrase are combined using a logical AND operation; results for entire phrases are
combined using a logical OR operation.searchables
- An array of Searchable
objects, or null
if the search
should inspect all available Searchable
sources. Retrieve Searchable
data sources
by calling getDeviceSearchables
.
Exception
- If any error occurs during a search.public abstract SearchResponse search(String[] phrases, Searchable searchable) throws Exception
Searchable
source specified.
phrases
- The search keyword phrases. Individual keywords in each
phrase are combined using a logical AND operation; results for entire phrases are
combined using a logical OR operation.searchable
- A Searchable
object, or null
if the search
should inspect all available Searchable
sources. Retrieve Searchable
data sources
by calling getDeviceSearchables
.
Exception
- If any error occurs during a search.public abstract SearchResponse search(String[] phrases) throws Exception
Searchable
sources.
phrases
- The search keyword phrases. Individual keywords in each
phrase are combined using a logical AND operation; results for entire phrases are
combined using a logical OR operation.
Exception
- If any error occurs during a search.public abstract void removeAllData(RegistrationToken token) throws IllegalArgumentException
token
- the RegistrationToken
acquired for the Searchable
data source during registration.
IllegalArgumentException
- if an invalid RegistrationToken
is providedpublic abstract void setDataSourceComparator(RegistrationToken token, Comparator cmp) throws IllegalArgumentException
token
- the RegistrationToken
acquired for the Searchable
data source during registration.cmp
- the Comparator
to be applied to the data source. A null parameter is valid.
IllegalArgumentException
- if an invalid RegistrationToken
or Comparator
is provided
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal