|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.unifiedsearch.content.AppContentManager
public abstract class AppContentManager
The primary way an application communicates with the Unified Search Service. Allows an application to insert, update, and delete
content in the Framework's content index. Note that the Framework replies to the application through the
AppContentListener interface.
While AppContentManager is an abstract class, it is not intended to be subclassed. See the
getInstance method for more information about using AppContentManager.
| Method Summary | ||
|---|---|---|
|
abstract void |
addSearchCriteria(SearchableEntity entity,
SearchFieldCriteriaList criteria,
RegistrationToken token)
Adds search keywords to a SearchableEntity that is already indexed. |
|
abstract void |
deleteContent(SearchableEntity entity,
AppContentListener observer,
RegistrationToken token)
Removes a SearchableEntity object from the Unified Search Service index. |
|
abstract void |
deleteContent(SearchableEntity[] entity,
AppContentListener observer,
RegistrationToken token)
Removes a set of SearchableEntity objects from the Unified Search Service index. |
|
static AppContentManager |
getInstance()
Retrieves the system's AppContentManager instance. |
|
abstract void |
insertContent(SearchableEntity entity,
AppContentListener observer,
RegistrationToken token)
Submits a SearchableEntity object to the Unified Search Service to be indexed. |
|
abstract void |
insertContent(SearchableEntity[] entity,
AppContentListener observer,
RegistrationToken token)
Submits an array of SearchableEntity objects to the Unified Search Service to be indexed. |
|
abstract void |
removeSearchCriteria(SearchableEntity entity,
SearchFieldCriteriaList criteria,
RegistrationToken token)
Removes search keywords from a SearchableEntity that is already indexed. |
|
abstract void |
updateContent(SearchableEntity entity,
AppContentListener observer,
RegistrationToken token)
Updates a SearchableEntity object already indexed by the Unified Search Service. |
|
abstract void |
updateContent(SearchableEntity[] entity,
AppContentListener observer,
RegistrationToken token)
Updates a set of SearchableEntity objects already indexed by the Unified Search Service. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static final AppContentManager getInstance()
AppContentManager instance. In practice, getInstance returns a system
implementation of AppContentManager that an application can use to insert, update, and delete content in the
Unified Search Service content index.
For example, an application could insert content using the insertContent method:
AppContentManager.getInstance().insertContent(MyEntity, MyAppContentListener, MyRegistrationToken)
AppContentManager implementation.
public abstract void insertContent(SearchableEntity entity,
AppContentListener observer,
RegistrationToken token)
SearchableEntity object to the Unified Search Service to be indexed. It is recommended
to avoid using this method if inserting multiple entities can be done using one of the overrides.
entity - The SearchableEntity object to index, which must not be null.observer - An AppContentListener to receive status notifications regarding this insert operation from the Unified
Search Framework.token - The registration token returned by the Unified Search Service when the Searchable for the
SearchableEntity was registered. It must be in a valid state.
public abstract void insertContent(SearchableEntity[] entity,
AppContentListener observer,
RegistrationToken token)
SearchableEntity objects to the Unified Search Service to be indexed.
entity - The SearchableEntity objects to index.observer - An AppContentListener to receive status notifications regarding this insert operation from the Unified
Search Framework.token - The registration token returned by the Unified Search Service when the Searchable for the
SearchableEntity was registered.
public abstract void updateContent(SearchableEntity entity,
AppContentListener observer,
RegistrationToken token)
SearchableEntity object already indexed by the Unified Search Service. It is recommended
to avoid using this method if updating multiple entities can be done using one of the overrides.
entity - A SearchableEntity object to update.observer - An AppContentListener to receive status notifications regarding this insert operation from the Unified
Search Framework.token - The registration token returned by the Unified Search Service when the Searchable for the
SearchableEntity was registered.
public abstract void updateContent(SearchableEntity[] entity,
AppContentListener observer,
RegistrationToken token)
SearchableEntity objects already indexed by the Unified Search Service.
entity - An array of SearchableEntity objects to update.observer - An AppContentListener to receive status notifications regarding this insert operation from the Unified
Search Framework.token - The registration token returned by the Unified Search Service when the Searchable for the
SearchableEntity was registered.
public abstract void deleteContent(SearchableEntity entity,
AppContentListener observer,
RegistrationToken token)
SearchableEntity object from the Unified Search Service index. It is recommended
to avoid using this method if updating multiple entities can be done using one of the overrides.
entity - A SearchableEntity object to remove from the Unified Search Service index.observer - An AppContentListener to receive status notifications regarding this insert operation from the Unified
Search Framework.token - The registration token returned by the Unified Search Service when the Searchable for the
SearchableEntity was registered.
public abstract void deleteContent(SearchableEntity[] entity,
AppContentListener observer,
RegistrationToken token)
SearchableEntity objects from the Unified Search Service index.
entity - An array of SearchableEntity objects to remove from the Unified Search Service index.observer - An AppContentListener to receive status notifications regarding this insert operation from the Unified
Search Framework.token - The registration token returned by the Unified Search Service when the Searchable for the
SearchableEntity was registered.
public abstract void addSearchCriteria(SearchableEntity entity,
SearchFieldCriteriaList criteria,
RegistrationToken token)
SearchableEntity that is already indexed.
If the SearchableEntity does not exist in the Unified Search Service's
content repository, an IllegalArgumentException is thrown. This method
requires Searchable.getComparator() to have a non-null return
value.
This method blocks the calling thread until the operation is complete. You should
update the SearchFieldCriteriaList attributes of a
SearchableEntity object on a non-event thread.
entity - The SearchableEntity to associate with additional keywords.criteria - The SearchField and keyword specification that should be used to add new keywords to the entitytoken - The (valid) registration token associated with the calling application when it registered its Searchable
instance
public abstract void removeSearchCriteria(SearchableEntity entity,
SearchFieldCriteriaList criteria,
RegistrationToken token)
SearchableEntity that is already indexed.
If the SearchableEntity does not exist in the Unified Search Service's
content repository, an IllegalArgumentException is thrown. This method
requires that Searchable.getComparator() have a non-null return
value.
This method blocks the calling thread until the operation is complete. You should
update the SearchFieldCriteriaList attributes of a
SearchableEntity object on a non-event thread.
entity - The SearchableEntity to disassociate from the
keywords specified in the SearchFieldCriteriaList.criteria - The SearchField and keyword specification that should be used to remove keywords from the index
associated with the entitytoken - The (valid) registration token associated with the calling application when it registered its Searchable
instance
|
|||||||||
| 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