net.rim.device.api.unifiedsearch.action
Class UiAction

java.lang.Object
  extended by net.rim.device.api.unifiedsearch.action.UiAction

public abstract class UiAction
extends Object

Allows a data source provider to determine the user interface (UI) elements that display when a user selects a search result. UiAction provides a generic way for SearchableEntity objects to present context-sensitive action choices to a search user.

A data source provider should implement UiAction for all actions relevant to the data, then make those action objects available through the provider's Searchable and SearchableEntity objects. An application that creates appointment data, for example, may want separate actions for canceling an appointment, sending a reminder, and calling attendees.

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

Constructor Summary
Category: Signed UiAction()
          Initializes a new UiAction.
 
Method Summary
Category: Signed  Image getIcon()
          Returns the icon associated with this action.
Category: Signed  Object getSearchKeywords()
          Returns the search keywords used to find the SearchableEntity associated with this UiAction or null if none exist.
Category: Signed  SearchableEntity getSearchableEntity()
          Returns the SearchableEntity associated with this UiAction or null if none exists.
Category: Signed  void performAction(SearchableEntity consumed)
          Provides a public wrapper for runAction().
Category: Signed protected abstract  void runAction()
          Defines application-specific behavior.
Category: Signed  void setEntryPointIndex(int index)
          Set the application entry point index.
Category: Signed  void setSearchKeywords(Object searchKeywords)
          Set the search keywords.
Category: Signed  String toString()
          Returns the name for this action.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 



Constructor Detail

UiAction

public UiAction()
Initializes a new UiAction.

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 Detail

performAction

public final void performAction(SearchableEntity consumed)
Provides a public wrapper for runAction(). Allows an application to prepare the platform, the SearchableEntity submitted, or another part of the application for the impending action. For example, an application could check for, or enforce, referential integrity between data elements in this function.

Parameters:
consumed - The SearchableEntity that invoked the action.
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

getSearchableEntity

public SearchableEntity getSearchableEntity()
Returns the SearchableEntity associated with this UiAction or null if none exists.

Returns:
The SearchableEntity object associated with this action.
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

getSearchKeywords

public Object getSearchKeywords()
Returns the search keywords used to find the SearchableEntity associated with this UiAction or null if none exist.

Returns:
The search keywords, which can be any Object, but likely a String or String[].
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

setSearchKeywords

public void setSearchKeywords(Object searchKeywords)
Set the search keywords.

Parameters:
searchKeywords - The search keywords object.
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

runAction

protected abstract void runAction()
Defines application-specific behavior. For example, if the SearchableEntity represents a contact displayed in a list, then selecting the contact should push an application screen that knows how to display the details of the contact.

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

toString

public String toString()
Returns the name for this action.

Overrides:
toString in class Object
Returns:
The name of this action.
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

getIcon

public Image getIcon()
Returns the icon associated with this action.

Returns:
The icon associated with this action.
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

setEntryPointIndex

public void setEntryPointIndex(int index)
Set the application entry point index. Applications are responsible to set the entry point index for performing the UI actions on the searchable entities. By default, the index is 0.

Parameters:
index - The index that corresponds to the order in which alternate entry points were created in the original BlackBerry application project from 0. Applications can create one separate alternate entry point for all the UI actions. This way applications can distinguish whether the application was launched directly or whether the application was launched since the UI action was performed.
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





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