net.rim.device.api.system
Class MultiServicePlatformManager

java.lang.Object
  extended by net.rim.device.api.system.MultiServicePlatformManager
All Implemented Interfaces:
ITPolicyChangedListener, ITPolicyListener

public class MultiServicePlatformManager
extends Object
implements ITPolicyChangedListener

A framework that coordinates the handling of service-specific data in environments that implement the BlackBerry Balance feature. BlackBerry Balance is available in BlackBerry Enterprise Server 5.0.3 and later.

For more information about BlackBerry Balance, see Securing Devices for Personal Use and Work Use, available at www.blackberry.com/security

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 static int addListener(MultiServicePlatformListener listener)
          Adds a listener to listen for organizational wipe commands regardless of the type of data being deleted, at medium priority.
Category: Signed static int addListener(MultiServicePlatformListener listener, int priority)
          Adds a listener to listen for organizational wipe commands, with the specified priority.
Category: Signed static int addListener(MultiServicePlatformListener listener, int priority, long dataOfInterest)
          Adds a listener to listen for organizational wipe commands, with the specified priority and data type.
Category: Signed static ServiceMode getApplicationServiceMode()
          Gets the service mode of the current application.
Category: Signed static String getDefaultCorporateServiceUid()
          Gets the default corporate service UID.
Category: Signed static String getDefaultNonCorporateServiceUid()
          Gets the default non-corporate service UID.
Category: Signed static String getDefaultUndecidedServiceUid()
          Get the "undecided" service UID.
Category: Signed static int isAccessAllowed(ServiceMode serviceMode, boolean checkProcessModule)
          Checks if the current thread or process is allowed to access resources that are associated with the specified service mode.
Category: Signed static int isAccessAllowed(ServiceMode sourceServiceMode, ServiceMode destinationServiceMode)
          Checks if resources from the source service are allowed to be shared with the destination service.
Category: Signed static boolean isCorporateResource(String inputString)
          Determines if a string identifies a corporate resource.
Category: Signed static boolean isCorporateServiceUid(String serviceUid)
          Checks if the specified service is a corporate service.
Category: Signed static boolean isForwardingDisabledViaNonCorporateChannels()
          Checks if the "Disable Forwarding of Work Content Using Personal Channels" IT policy rule is set.
Category: Signed static boolean isListener(MultiServicePlatformListener listener)
          Checks if a specific listener is already registered.
Category: Signed static boolean isOrganizationalDataSeparationEnabled()
          Checks if the "Enable Separation of Work Content" IT policy rule is set.
Category: Signed static boolean isRequireWorkResourcesForConductingWorkActivitiesEnabled()
          Checks if the "Require Work Resources For Conducting Work Activities" IT policy rule is set.
Category: Signed static int removeListener(MultiServicePlatformListener listener)
          Removes the specified listener.
Category: Signed static boolean suggestApplicationServiceMode(ServiceMode serviceMode)
          Suggests a new service mode for the current application.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.rim.device.api.itpolicy.ITPolicyChangedListener
policyChanged
 



Method Detail

addListener

public static int addListener(MultiServicePlatformListener listener)
Adds a listener to listen for organizational wipe commands regardless of the type of data being deleted, at medium priority.

This is a convenience method to MultiServicePlatformManager.addListener(MultiServicePlatformListener, int, long). The priority set for the listener is MultiServicePlatformConstants.MEDIUM_PRIORITY. The data type for the listener is MultiServicePlatformConstants.NO_GRANULARITY, which means that the listener listens for all wipe commands regardless of the type of data being deleted.

Parameters:
listener - The listener to be added.
Returns:
MultiServicePlatformConstants.SUCCESS if the listener was added successfully; otherwise MultiServicePlatformConstants.FAILURE.
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

addListener

public static int addListener(MultiServicePlatformListener listener,
                              int priority)
Adds a listener to listen for organizational wipe commands, with the specified priority.

The priorities can be LOW_PRIORITY, MEDIUM_PRIORITY, or HIGH_PRIORITY. Priorities set the order in which listeners are called: high is called before medium which is called before low. Listeners with the same priority are called in any order.

This is a convenience method to MultiServicePlatformManager.addListener(MultiServicePlatformListener, int, long). The data type for the listener is MultiServicePlatformConstants.NO_GRANULARITY.

Parameters:
priority - The priority of the listener to be added.
Returns:
MultiServicePlatformConstants.SUCCESS if the listener was added successfully; otherwise MultiServicePlatformConstants.FAILURE.
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

addListener

public static int addListener(MultiServicePlatformListener listener,
                              int priority,
                              long dataOfInterest)
Adds a listener to listen for organizational wipe commands, with the specified priority and data type.

The added listener is executed when a wipe is initiated. The callbacks are executed in the calling process rather than the process responsible for performing the operations provided by the MultiServicePlatformManager. Previously registered listeners are removed and re-added with the current parameters that have been specified.

Only one instance of each unique class implementing the MultiServicePlatformListener interface can be registered at a time. If the specified listener is an instance of a class for which a listener is already registered, then the original listener is removed and the new listener with the specified priority and "data of interest" is saved.

The priorities can be LOW_PRIORITY, MEDIUM_PRIORITY, or HIGH_PRIORITY. Priorities set the order in which listeners are called: high is called before medium which is called before low. Listeners with the same priority are called in any order.

You should implement a public default constructor to which makes it possible for the MultiServicePlatformManager to recreate a listener, if needed, when a wipe is initiated.

Parameters:
listener - The object that implements the MultiServicePlatformListener interface to be added.
priority - The priority for the listener to be added.
dataOfInterest - The bitmask representing the type of data the listener should listen for when wiped. Specify MultiServicePlatformConstants.NO_GRANULARITY if the listener should be notified when any organizational wipe is performed.
Returns:
MultiServicePlatformConstants.SUCCESS if the listener was added successfully; otherwise MultiServicePlatformConstants.FAILURE.
See Also:
MultiServicePlatformConstants
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

isListener

public static boolean isListener(MultiServicePlatformListener listener)
Checks if a specific listener is already registered.

Parameters:
listener - The object that implements the MultiServicePlatformListener interface.
Returns:
true if the listener is already registered, false otherwise.
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

removeListener

public static int removeListener(MultiServicePlatformListener listener)
Removes the specified listener.

Parameters:
listener - The object that the caller wants to remove from the list of listeners.
Returns:
MultiServicePlatformConstants.SUCCESS if the listener was removed successfully; otherwise MultiServicePlatformConstants.FAILURE.
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

isForwardingDisabledViaNonCorporateChannels

public static boolean isForwardingDisabledViaNonCorporateChannels()
Checks if the "Disable Forwarding of Work Content Using Personal Channels" IT policy rule is set.

Returns:
true if forwarding corporate data via non-corporate channels is disabled; false otherwise.
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

isOrganizationalDataSeparationEnabled

public static boolean isOrganizationalDataSeparationEnabled()
Checks if the "Enable Separation of Work Content" IT policy rule is set.

Returns:
true if the "Enable Separation of Work Content" IT policy rule is enabled; otherwise false.
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

isRequireWorkResourcesForConductingWorkActivitiesEnabled

public static boolean isRequireWorkResourcesForConductingWorkActivitiesEnabled()
Checks if the "Require Work Resources For Conducting Work Activities" IT policy rule is set.

Returns:
true if the "Require Work Resources For Conducting Work Activities" IT policy rule is set; otherwise false.
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

isCorporateResource

public static boolean isCorporateResource(String inputString)
Determines if a string identifies a corporate resource. Examples of corporate resources are email accounts and servers. Corporate resources are identified using domain information.

Returns:
true if the string identifies a corporate resource; false otherwise.
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

isAccessAllowed

public static int isAccessAllowed(ServiceMode sourceServiceMode,
                                  ServiceMode destinationServiceMode)
Checks if resources from the source service are allowed to be shared with the destination service. The following table summarizes the results of this method:

Source Service Destination Service Result
Corporate Service Mode Corporate Service Mode MultiServicePlatformConstants.ACTION_ALLOWED
Corporate Service Mode Non-Corporate Service Mode MultiServicePlatformConstants.ACTION_DISALLOWED
Non-Corporate Service Mode Corporate Service Mode MultiServicePlatformConstants.ACTION_ALLOWED
Non-Corporate Service Mode Non-Corporate Service Mode MultiServicePlatformConstants.ACTION_ALLOWED
Undecided Service Mode Undecided Service Mode MultiServicePlatformConstants.ACTION_ALLOWED
Undecided Service Mode Corporate Service Mode MultiServicePlatformConstants.ACTION_ALLOWED
Undecided Service Mode Non-Corporate Service Mode MultiServicePlatformConstants.ACTION_ALLOWED
Corporate Service Mode Undecided Service Mode MultiServicePlatformConstants.ACTION_ALLOWED_AND_NOTIFY
Non-Corporate Service Mode Undecided Service Mode MultiServicePlatformConstants.ACTION_ALLOWED_AND_NOTIFY

Parameters:
sourceServiceMode - The source service from which resources are being requested; must not be null.
destinationServiceMode - The destination service with which resources are being shared; must not be null.
Returns:
MultiServicePlatformConstants.ACTION_ALLOWED if the data associated with sourceServiceUid may pass to an application in destinationServiceUid service mode; otherwise MultiServicePlatformConstants.ACTION_DISALLOWED and MultiServicePlatformConstants.ACTION_ALLOWED_AND_NOTIFY if the application is allowed to handle the data but must be notified of the type of data that it received.
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

isAccessAllowed

public static int isAccessAllowed(ServiceMode serviceMode,
                                  boolean checkProcessModule)
Checks if the current thread or process is allowed to access resources that are associated with the specified service mode.

Parameters:
serviceMode - The service whose resources are being accessed; must not be null.
checkProcessModule - true if the permissions of the process module should be checked in addition to the permissions of the current thread; false if only the permissions of the current thread should be checked.
Returns:
MultiServicePlatformConstants.ACTION_DISALLOWED if the current thread and/or process is not allowed to access resources associated with the specified service; MultiServicePlatformConstants.ACTION_ALLOWED if the current thread and/or process is allowed to access resources associated with the specified service.
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

getDefaultNonCorporateServiceUid

public static String getDefaultNonCorporateServiceUid()
Gets the default non-corporate service UID.

Returns:
The default non-corporate service UID; guaranteed not to 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

getDefaultUndecidedServiceUid

public static String getDefaultUndecidedServiceUid()
Get the "undecided" service UID.

Returns:
the service UID that an application can use to indicate that it is operating in a mode which is not tied to any specific service; guaranteed not to 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

getDefaultCorporateServiceUid

public static String getDefaultCorporateServiceUid()
Gets the default corporate service UID.

Returns:
The default corporate service UID if the device is activated; null otherwise.
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

isCorporateServiceUid

public static boolean isCorporateServiceUid(String serviceUid)
Checks if the specified service is a corporate service.

Parameters:
serviceUid - The UID of the service to check.
Returns:
true if the specified service is a corporate service; false otherwise.
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

getApplicationServiceMode

public static ServiceMode getApplicationServiceMode()
Gets the service mode of the current application. The current application is the application from which this method is being called. The following table summarizes the possible results of this method:

Current Service Mode Are Corporate Services Available Is Allowed Access to Corporate Data Resulting Service Mode
Unspecified Yes Yes Default Corporate Service Mode
Unspecified Yes No Default Non-corporate Service Mode
Corporate Yes Yes Corporate
Corporate Yes No Default Non-corporate Service Mode
Non-corporate Yes Yes Non-corporate
Non-corporate Yes No Non-corporate
Default Undecided Service Mode Yes Yes Default Undecided Service Mode
Default Undecided Service Mode Yes No Default Non-corporate Service Mode
Unspecified No Not Applicable Default Non-corporate Service Mode
Corporate No Not Applicable Corporate
Non-Corporate No Not Applicable Non-Corporate
Default Undecided Service Mode No Not Applicable Default Undecided Service Mode

Returns:
The service mode of the current application.
Throws:
IllegalStateException - if called from a process that does not have an associated application.
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

suggestApplicationServiceMode

public static boolean suggestApplicationServiceMode(ServiceMode serviceMode)
Suggests a new service mode for the current application.

This method allows code executing within a given process to request that the process switch to the specified mode. Depending on its current state, the process may or may not choose to switch to the specified mode.

If there is no application associated with the current process, then false is returned.

Parameters:
serviceMode - The new service mode being suggested for this application; may be null.
Returns:
true if the new mode was accepted; false otherwise.
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