SHOW Signed
 

net.rim.device.api.applicationcontrol
Class ApplicationPermissions

java.lang.Object
  |
  +--net.rim.device.api.applicationcontrol.ApplicationPermissions

public final class ApplicationPermissions
extends Object

Instances of this class will store a mapping from permissions to values.

Permissions

This class contains a set of constants whose names begin with PERMISSION_ (for example PERMISSION_BLUETOOTH). Each one of these "permissions" refers to a particular subset of the API that can be restricted by that application control.

Permission Values

Each permission can be set to one of three values. These values are (in order from least restrictive first to most restrictive last):
  1. VALUE_ALLOW
  2. VALUE_PROMPT
  3. VALUE_DENY
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:
JDE 4.2.1

Field Summary
 Category: Signed static int PERMISSION_APPLICATION_MANAGEMENT
          This permission controls an application's ability to add and remove code modules and manage the installation or deletion of applications.
 Category: Signed static int PERMISSION_BLUETOOTH
          This permission controls an application's ability to send and receive data using Bluetooth, as well as access to the supported Bluetooth profiles.
 Category: Signed static int PERMISSION_BROWSER_FILTER
          This permission controls an application's ability to register a browser filter with the browser.
 Category: Signed static int PERMISSION_CHANGE_DEVICE_SETTINGS
          Deprecated. As of 4.6, replaced by PERMISSION_DEVICE_SETTINGS
 Category: Signed static int PERMISSION_CODE_MODULE_MANAGEMENT
          Deprecated. As of 4.6, replaced by PERMISSION_APPLICATION_MANAGEMENT
 Category: Signed static int PERMISSION_CROSS_APPLICATION_COMMUNICATION
          This permission controls an application's ability to share data and messages with other applications on the device.
 Category: Signed static int PERMISSION_DEVICE_SETTINGS
          This permission controls an application's ability to change configuration and user settings on the device.
 Category: Signed static int PERMISSION_EMAIL
          This permission controls an application's access to the mail API and access to the user's mail store.
 Category: Signed static int PERMISSION_EVENT_INJECTOR
          Deprecated. As of 4.6, replaced by PERMISSION_INPUT_SIMULATION
 Category: Signed static int PERMISSION_EXTERNAL_CONNECTIONS
          Deprecated. As of 4.6, replaced by PERMISSION_INTERNET
 Category: Signed static int PERMISSION_FILE_API
           
 Category: Signed static int PERMISSION_HANDHELD_KEYSTORE
          Deprecated. As of 4.6, replaced by PERMISSION_SECURITY_DATA
 Category: Signed static int PERMISSION_IDLE_TIMER
          This permission controls an application's ability to reset the security timer, and by doing so, prevent the device from locking.
 Category: Signed static int PERMISSION_INPUT_SIMULATION
          This permission controls an application's ability to inject events into the system.
 Category: Signed static int PERMISSION_INTER_PROCESS_COMMUNICATION
          Deprecated. As of 4.6, replaced by PERMISSION_CROSS_APPLICATION_COMMUNICATION
 Category: Signed static int PERMISSION_INTERNAL_CONNECTIONS
          Deprecated. As of 4.6, replaced by PERMISSION_SERVER_NETWORK
 Category: Signed static int PERMISSION_INTERNET
          This permission controls an application's ability to send and receive data using external connections.
 Category: Signed static int PERMISSION_KEYSTORE_MEDIUM_SECURITY
          Deprecated. As of 4.6, this permission is no longer used.
 Category: Signed static int PERMISSION_LOCAL_CONNECTIONS
          Deprecated. As of 4.6, replaced by PERMISSION_USB
 Category: Signed static int PERMISSION_LOCATION_API
          Deprecated. As of 4.6, replaced by PERMISSION_LOCATION_DATA
 Category: Signed static int PERMISSION_LOCATION_DATA
          This permission controls an application's ability to access location-based services such as use of the GPS radio.
 Category: Signed static int PERMISSION_MEDIA
          This permission controls an application's ability to execute and manage multimedia files.
 Category: Signed static int PERMISSION_ORGANIZER_DATA
          This permission controls an application's ability to access the PIM API and access to personal information management stores such as contacts, tasks and events.
 Category: Signed static int PERMISSION_PHONE
          This permission controls an application's ability to place and receive phone calls as well as access to phone logs and phone data.
 Category: Signed static int PERMISSION_PIM
          Deprecated. As of 4.6, replaced by PERMISSION_ORGANIZER_DATA
 Category: Signed static int PERMISSION_RECORDING
          This permission controls an application's ability to record data.
 Category: Signed static int PERMISSION_SCREEN_CAPTURE
          Deprecated. As of 4.6, replaced by PERMISSION_RECORDING
 Category: Signed static int PERMISSION_SECURITY_DATA
          This permission controls an application's ability to access the device key store and related API.
 Category: Signed static int PERMISSION_SERVER_NETWORK
          This permission controls an application's ability to send and receive data using connections routed through a corporate network using the BlackBerry MDS Services.
 Category: Signed static int PERMISSION_THEME_DATA
          Deprecated. As of 4.6, replaced by PERMISSION_THEMES
 Category: Signed static int PERMISSION_THEMES
          This permission controls an application's ability to register and provide theme information to the device.
 Category: Signed static int PERMISSION_USB
          This permission controls an application's ability to make local connections on the device through USB.
 Category: Signed static int PERMISSION_WIFI
          This permission controls an application's ability to send and receive data over the Wi-Fi link, as well as access to information about the Wi-Fi network.
 Category: Signed static int VALUE_ALLOW
          A constant representing a permission's value of "allow".
 Category: Signed static int VALUE_DENY
          A constant representing a permission's value of "deny".
 Category: Signed static int VALUE_PROMPT
          A constant representing a permission's value of "prompt".
 
Constructor Summary
 Category: Signed ApplicationPermissions()
          Creates a new empty ApplicationPermissions object.
 
Method Summary
 Category: Signed  void addPermission(int permission)
          Adds a permission with the value VALUE_ALLOW.
 Category: Signed  boolean containsPermissionKey(int permission)
          Returns whether or not a permission has been added.
 Category: Signed  int[] difference(ApplicationPermissions other)
          Returns the set of permissions in this object whose values are different than those of another.
 Category: Signed  int getPermission(int permission)
          Returns the value for a permission.
 Category: Signed  int[] getPermissionKeys()
          Returns the set of permissions that have been added.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PERMISSION_APPLICATION_MANAGEMENT

public static final int PERMISSION_APPLICATION_MANAGEMENT
This permission controls an application's ability to add and remove code modules and manage the installation or deletion of applications.
Since:
JDE 4.6.0
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.

PERMISSION_BLUETOOTH

public static final int PERMISSION_BLUETOOTH
This permission controls an application's ability to send and receive data using Bluetooth, as well as access to the supported Bluetooth profiles.
Since:
JDE 4.2.1
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.

PERMISSION_BROWSER_FILTER

public static final int PERMISSION_BROWSER_FILTER
This permission controls an application's ability to register a browser filter with the browser.
Since:
JDE 4.2.1
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.

PERMISSION_CHANGE_DEVICE_SETTINGS

public static final int PERMISSION_CHANGE_DEVICE_SETTINGS
Deprecated. As of 4.6, replaced by PERMISSION_DEVICE_SETTINGS

This permission controls an application's ability to change configuration and user settings on the device.
Since:
JDE 4.2.1
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.

PERMISSION_CODE_MODULE_MANAGEMENT

public static final int PERMISSION_CODE_MODULE_MANAGEMENT
Deprecated. As of 4.6, replaced by PERMISSION_APPLICATION_MANAGEMENT

This permission controls an application's ability to add and remove code modules and manage the installation or deletion of applications.
Since:
JDE 4.2.1
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.

PERMISSION_CROSS_APPLICATION_COMMUNICATION

public static final int PERMISSION_CROSS_APPLICATION_COMMUNICATION
This permission controls an application's ability to share data and messages with other applications on the device.
Since:
JDE 4.6.0
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.

PERMISSION_DEVICE_SETTINGS

public static final int PERMISSION_DEVICE_SETTINGS
This permission controls an application's ability to change configuration and user settings on the device.
Since:
JDE 4.6.0
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.

PERMISSION_EMAIL

public static final int PERMISSION_EMAIL
This permission controls an application's access to the mail API and access to the user's mail store.
Since:
JDE 4.2.1
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.

PERMISSION_EVENT_INJECTOR

public static final int PERMISSION_EVENT_INJECTOR
Deprecated. As of 4.6, replaced by PERMISSION_INPUT_SIMULATION

This permission controls an application's ability to inject events into the system.
Since:
JDE 4.2.1
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.

PERMISSION_EXTERNAL_CONNECTIONS

public static final int PERMISSION_EXTERNAL_CONNECTIONS
Deprecated. As of 4.6, replaced by PERMISSION_INTERNET

This permission controls an application's ability to send and receive data using external connections. Direct TCP and WAP are examples of external connections.
Since:
JDE 4.2.1
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.

PERMISSION_FILE_API

public static final int PERMISSION_FILE_API
Since:
JDE 4.2.1
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.

PERMISSION_HANDHELD_KEYSTORE

public static final int PERMISSION_HANDHELD_KEYSTORE
Deprecated. As of 4.6, replaced by PERMISSION_SECURITY_DATA

This permission controls an application's ability to access the device key store and related API.
Since:
JDE 4.2.1
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.

PERMISSION_IDLE_TIMER

public static final int PERMISSION_IDLE_TIMER
This permission controls an application's ability to reset the security timer, and by doing so, prevent the device from locking.
Since:
JDE 4.2.1
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.

PERMISSION_INPUT_SIMULATION

public static final int PERMISSION_INPUT_SIMULATION
This permission controls an application's ability to inject events into the system.
Since:
JDE 4.6.0
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.

PERMISSION_INTER_PROCESS_COMMUNICATION

public static final int PERMISSION_INTER_PROCESS_COMMUNICATION
Deprecated. As of 4.6, replaced by PERMISSION_CROSS_APPLICATION_COMMUNICATION

This permission controls an application's ability to share data and messages with other applications on the device.
Since:
JDE 4.3.0
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.

PERMISSION_INTERNAL_CONNECTIONS

public static final int PERMISSION_INTERNAL_CONNECTIONS
Deprecated. As of 4.6, replaced by PERMISSION_SERVER_NETWORK

This permission controls an application's ability to send and receive data using connections routed through a corporate network using the BlackBerry MDS Services.
Since:
JDE 4.2.1
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.

PERMISSION_INTERNET

public static final int PERMISSION_INTERNET
This permission controls an application's ability to send and receive data using external connections. Direct TCP and WAP are examples of external connections.
Since:
JDE 4.6.0
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.

PERMISSION_KEYSTORE_MEDIUM_SECURITY

public static final int PERMISSION_KEYSTORE_MEDIUM_SECURITY
Deprecated. As of 4.6, this permission is no longer used.

Since:
JDE 4.2.1
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.

PERMISSION_LOCAL_CONNECTIONS

public static final int PERMISSION_LOCAL_CONNECTIONS
Deprecated. As of 4.6, replaced by PERMISSION_USB

This permission controls an application's ability to make local connections on the device through USB.
Since:
JDE 4.2.1
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.

PERMISSION_LOCATION_API

public static final int PERMISSION_LOCATION_API
Deprecated. As of 4.6, replaced by PERMISSION_LOCATION_DATA

This permission controls an application's ability to access location-based services such as use of the GPS radio.
Since:
JDE 4.2.1
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.

PERMISSION_LOCATION_DATA

public static final int PERMISSION_LOCATION_DATA
This permission controls an application's ability to access location-based services such as use of the GPS radio.
Since:
JDE 4.6.0
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.

PERMISSION_MEDIA

public static final int PERMISSION_MEDIA
This permission controls an application's ability to execute and manage multimedia files.
Since:
JDE 4.3.0
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.

PERMISSION_ORGANIZER_DATA

public static final int PERMISSION_ORGANIZER_DATA
This permission controls an application's ability to access the PIM API and access to personal information management stores such as contacts, tasks and events.
Since:
JDE 4.6.0
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.

PERMISSION_PHONE

public static final int PERMISSION_PHONE
This permission controls an application's ability to place and receive phone calls as well as access to phone logs and phone data.
Since:
JDE 4.2.1
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.

PERMISSION_PIM

public static final int PERMISSION_PIM
Deprecated. As of 4.6, replaced by PERMISSION_ORGANIZER_DATA

This permission controls an application's ability to access the PIM API and access to personal information management stores such as contacts, tasks and events.
Since:
JDE 4.2.1
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.

PERMISSION_RECORDING

public static final int PERMISSION_RECORDING
This permission controls an application's ability to record data. Examples include the capturing of images via the camera, recording of audio, and screen captures (pictures) of the screen.
Since:
JDE 4.6.0
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.

PERMISSION_SCREEN_CAPTURE

public static final int PERMISSION_SCREEN_CAPTURE
Deprecated. As of 4.6, replaced by PERMISSION_RECORDING

This permission controls an application's ability to take screen captures (pictures) of the screen.
Since:
JDE 4.3.0
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.

PERMISSION_SECURITY_DATA

public static final int PERMISSION_SECURITY_DATA
This permission controls an application's ability to access the device key store and related API.
Since:
JDE 4.6.0
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.

PERMISSION_SERVER_NETWORK

public static final int PERMISSION_SERVER_NETWORK
This permission controls an application's ability to send and receive data using connections routed through a corporate network using the BlackBerry MDS Services.
Since:
JDE 4.6.0
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.

PERMISSION_THEME_DATA

public static final int PERMISSION_THEME_DATA
Deprecated. As of 4.6, replaced by PERMISSION_THEMES

This permission controls an application's ability to register and provide theme information to the device.
Since:
JDE 4.2.1
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.

PERMISSION_THEMES

public static final int PERMISSION_THEMES
This permission controls an application's ability to register and provide theme information to the device.
Since:
JDE 4.6.0
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.

PERMISSION_USB

public static final int PERMISSION_USB
This permission controls an application's ability to make local connections on the device through USB.
Since:
JDE 4.6.0
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.

PERMISSION_WIFI

public static final int PERMISSION_WIFI
This permission controls an application's ability to send and receive data over the Wi-Fi link, as well as access to information about the Wi-Fi network.
Since:
JDE 4.3.0
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.

VALUE_ALLOW

public static final int VALUE_ALLOW
A constant representing a permission's value of "allow". If a permission is set to this value then it may use APIs controlled by the permission.
Since:
JDE 4.2.1
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.

VALUE_DENY

public static final int VALUE_DENY
A constant representing a permission's value of "deny". If a permission is set to this value then it may not use APIs controlled by the permission. Methods that are invoked when the corresponding Application Control is set to "deny" will throw an exception.
Since:
JDE 4.2.1
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.

VALUE_PROMPT

public static final int VALUE_PROMPT
A constant representing a permission's value of "prompt". If a permission is set to this value then it may use APIs controlled by the permission, but the user will be prompted upon the first usage and potentially subsequent uses.
Since:
JDE 4.2.1
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.
Constructor Detail

ApplicationPermissions

public ApplicationPermissions()
Creates a new empty ApplicationPermissions object.
Since:
JDE 4.2.1
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.
Method Detail

addPermission

public void addPermission(int permission)
Adds a permission with the value VALUE_ALLOW. If the specified permission has already been added (that is, this.containsPermissionKey(permission) returns true) then its value is overwritten with VALUE_ALLOW.
Parameters:
permission - the permission to add with the value VALUE_ALLOW; valid values are any of the PERMISSION_ constants.
Throws:
IllegalArgumentException - if permission is not a valid value.
Since:
JDE 4.2.1
See Also:
getPermission(int)
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.

containsPermissionKey

public boolean containsPermissionKey(int permission)
Returns whether or not a permission has been added.

A permission is considered to have been "added" if and only if it is contained in the array returned from getPermissionKeys().

Parameters:
permission - the permission to test for having been added; valid values are any of the PERMISSION_ constants.
Returns:
true if the specified permission has been added; false otherwise.
Throws:
IllegalArgumentException - if permission is not valid.
Since:
JDE 4.2.1
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.

difference

public int[] difference(ApplicationPermissions other)
Returns the set of permissions in this object whose values are different than those of another.

Formally, this method returns an array containing every PERMISSION_ constant, permission, that satisfies

     this.containsPermissionKey(permission) &&
     other.containsPermissionKey(permission) &&
     this.getPermission(permission) != other.getPermission(permission)
 
Parameters:
other - the ApplicationPermissions object to compare to this.
Returns:
the set of permissions in this object whose values are different than those of other, as defined above, or an empty array if there is no such difference; never returns null.
Throws:
NullPointerException - if other is null.
Since:
JDE 4.2.1
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.

getPermission

public int getPermission(int permission)
Returns the value for a permission.
Parameters:
permission - the permission whose value to return; valid values are any of the PERMISSION_ constants.
Returns:
the value of the specified permission; will be equal to one of the VALUE_ constants.
Throws:
IllegalArgumentException - if permission is not a valid value or if permission has not been added; that is, this.containsPermissionKey(permission) returns false.
Since:
JDE 4.2.1
See Also:
addPermission(int)
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.

getPermissionKeys

public int[] getPermissionKeys()
Returns the set of permissions that have been added.
Returns:
the set of permissions that have been added, or an empty array if none have been added; never returns null; each element of the returned array will be equal to one of the permission constants defined in this class.
Since:
JDE 4.2.1
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.



Copyright 1999-2009 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.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.