net.rim.device.api.crypto.certificate.status
Interface ProviderUiContext


public interface ProviderUiContext

Allows certificate status providers to display UI to the user (while processing status requests or responses) in a uniform fashion.

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 3.6.0

Field Summary
Category: Signed static int NO_UI_AVAILABLE
          Indicates that no UI is currently available.
 
Method Summary
Category: Signed  int promptUser(String title, String message, String[] buttonText, int[] returnCodes)
          Prompts the user with a dialog containing the specified title, message, and buttons.
Category: Signed  void setErrorMessage(String message)
          Sets the error message for the current provider.
 



Field Detail

NO_UI_AVAILABLE

static final int NO_UI_AVAILABLE
Indicates that no UI is currently available. Either the request was cancelled, or the request was started as non-UI. This value is -1.

See Also:
Constant Field Values
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 3.6.0


Method Detail

promptUser

int promptUser(String title,
               String message,
               String[] buttonText,
               int[] returnCodes)
Prompts the user with a dialog containing the specified title, message, and buttons. A button is created for each entry in the buttonText array. This method blocks until the user chooses one of the buttons in the dialog. The return value is the return code associated with the specified button, as determined by the returnCodes array. If no UI is available to the provider for some reason, the method returns immediately with NO_UI_AVAILABLE.

Parameters:
title - A title to be shown at the top of the dialog.
message - A textual message to be shown to the user.
buttonText - An array of strings specifying the labels of the buttons that should be placed at the bottom of the dialog. One button is created for each string.
returnCodes - An array of integers storing the return codes for each button in buttonText.
Returns:
The return code of the button that was selected, or NO_UI_AVAILABLE if UI cannot presently be shown to the user.
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 3.6.0

setErrorMessage

void setErrorMessage(String message)
Sets the error message for the current provider. This method should be called in the case of an error to specify an error message that can be shown to the user. The message may or may not be shown to the user depending on how the status request was initiated (UI or non-UI) and the current state of the status popup dialog.

Parameters:
message - A (descriptive) textual error message that can be shown to the user.
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 3.6.0





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.