net.rim.device.api.unifiedsearch.searchables.adapters
Class RegisterableDataSource

java.lang.Object
  extended by net.rim.device.api.unifiedsearch.searchables.adapters.RegisterableDataSource
Direct Known Subclasses:
EntityBasedSearchableProvider, ExtendedSearchProvider

public class RegisterableDataSource
extends Object

A RegisterableDataSource is an object that can be registered with the search framework.

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

Method Summary
Category: Signed  boolean deregister()
          De-registers the RegisterableDataSource instance
Category: Signed  NotificationListener getListener()
          Gets the NotificationListener associated with this RegisterableDataSource
Category: Signed  long getRegistrationID()
          Returns the registration ID
Category: Signed  RegistrationToken getRegistrationToken()
          Returns the assigned RegistrationToken or null if has not yet been set
Category: Signed  RegistrationToken register()
          Registers the RegisterableDataSource instance
Category: Signed  void setListener(NotificationListener observer)
          Set the observer.
Category: Signed  void setRegistrationID(long id)
          This method is called by the framework when the RegisterableDataSource instance undergoes a registration operation.
Category: Signed  void setRegistrationToken(RegistrationToken token)
          Set the RegistrationToken associated with this RegisterableDataSource instance
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Method Detail

setRegistrationID

public final void setRegistrationID(long id)
This method is called by the framework when the RegisterableDataSource instance undergoes a registration operation.

Parameters:
id - the registration id of the RegisterableDataSource
Throws:
ControlledAccessException - if the application is not authorized to invoke this method
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

getRegistrationID

public final long getRegistrationID()
Returns the registration ID

Returns:
the registration id.
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

setRegistrationToken

public final void setRegistrationToken(RegistrationToken token)
Set the RegistrationToken associated with this RegisterableDataSource instance

Parameters:
token - The RegistrationToken assigned to this 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

getRegistrationToken

public final RegistrationToken getRegistrationToken()
Returns the assigned RegistrationToken or null if has not yet been set

Returns:
The RegistrationToken assigned to this object; it can be null.
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

deregister

public final boolean deregister()
                         throws RegistrationException
De-registers the RegisterableDataSource instance

Returns:
True if the object was successfully de-registered, false otherwise
Throws:
RegistrationException - if errors are encountered while performing the de-registration
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

register

public final RegistrationToken register()
                                 throws RegistrationException
Registers the RegisterableDataSource instance

Returns:
a RegistrationToken for the RegisterableDataSource
Throws:
RegistrationException - if an error occurs during registration
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

setListener

public final void setListener(NotificationListener observer)
Set the observer. When applicable events occur, the RegisterableDataSource will receive notifications via this object. When no longer needed, this method should be invoked with a null parameter to release the NotificationListener reference.

Parameters:
observer - the NotificationListener that will receive applicable events
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

getListener

public final NotificationListener getListener()
Gets the NotificationListener associated with this RegisterableDataSource

Returns:
The NotificationListener observer; It can be null if not set already.
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