net.rim.device.api.unifiedsearch.content
Class AppContentManager

java.lang.Object
  extended by net.rim.device.api.unifiedsearch.content.AppContentManager

public abstract class AppContentManager
extends Object

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.

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 6.0.0

Method Summary
Category: Signed abstract  void addSearchCriteria(SearchableEntity entity, SearchFieldCriteriaList criteria, RegistrationToken token)
          Adds search keywords to a SearchableEntity that is already indexed.
Category: Signed abstract  void deleteContent(SearchableEntity entity, AppContentListener observer, RegistrationToken token)
          Removes a SearchableEntity object from the Unified Search Service index.
Category: Signed abstract  void deleteContent(SearchableEntity[] entity, AppContentListener observer, RegistrationToken token)
          Removes a set of SearchableEntity objects from the Unified Search Service index.
Category: Signed static AppContentManager getInstance()
          Retrieves the system's AppContentManager instance.
Category: Signed abstract  void insertContent(SearchableEntity entity, AppContentListener observer, RegistrationToken token)
          Submits a SearchableEntity object to the Unified Search Service to be indexed.
Category: Signed abstract  void insertContent(SearchableEntity[] entity, AppContentListener observer, RegistrationToken token)
          Submits an array of SearchableEntity objects to the Unified Search Service to be indexed.
Category: Signed abstract  void removeSearchCriteria(SearchableEntity entity, SearchFieldCriteriaList criteria, RegistrationToken token)
          Removes search keywords from a SearchableEntity that is already indexed.
Category: Signed abstract  void updateContent(SearchableEntity entity, AppContentListener observer, RegistrationToken token)
          Updates a SearchableEntity object already indexed by the Unified Search Service.
Category: Signed 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

getInstance

public static final AppContentManager getInstance()
Retrieves the system's 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)

Returns:
The system's AppContentManager implementation.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 6.0.0

insertContent

public abstract void insertContent(SearchableEntity entity,
                                   AppContentListener observer,
                                   RegistrationToken token)
Submits a 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.

Parameters:
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.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 7.0.0

insertContent

public abstract void insertContent(SearchableEntity[] entity,
                                   AppContentListener observer,
                                   RegistrationToken token)
Submits an array of SearchableEntity objects to the Unified Search Service to be indexed.

Parameters:
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.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 6.0.0

updateContent

public abstract void updateContent(SearchableEntity entity,
                                   AppContentListener observer,
                                   RegistrationToken token)
Updates a 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.

Parameters:
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.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 7.0.0

updateContent

public abstract void updateContent(SearchableEntity[] entity,
                                   AppContentListener observer,
                                   RegistrationToken token)
Updates a set of SearchableEntity objects already indexed by the Unified Search Service.

Parameters:
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.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 6.0.0

deleteContent

public abstract void deleteContent(SearchableEntity entity,
                                   AppContentListener observer,
                                   RegistrationToken token)
Removes a 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.

Parameters:
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.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 7.0.0

deleteContent

public abstract void deleteContent(SearchableEntity[] entity,
                                   AppContentListener observer,
                                   RegistrationToken token)
Removes a set of SearchableEntity objects from the Unified Search Service index.

Parameters:
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.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 6.0.0

addSearchCriteria

public abstract void addSearchCriteria(SearchableEntity entity,
                                       SearchFieldCriteriaList criteria,
                                       RegistrationToken token)
Adds search keywords to a 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.

Parameters:
entity - The SearchableEntity to associate with additional keywords.
criteria - The SearchField and keyword specification that should be used to add new keywords to the entity
token - The (valid) registration token associated with the calling application when it registered its Searchable instance
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 7.0.0

removeSearchCriteria

public abstract void removeSearchCriteria(SearchableEntity entity,
                                          SearchFieldCriteriaList criteria,
                                          RegistrationToken token)
Removes search keywords from a 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.

Parameters:
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 entity
token - The (valid) registration token associated with the calling application when it registered its Searchable instance
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 7.0.0





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