|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.system.MultiServicePlatformManager
public class MultiServicePlatformManager
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.
| Method Summary | ||
|---|---|---|
|
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. |
|
static int |
addListener(MultiServicePlatformListener listener,
int priority)
Adds a listener to listen for organizational wipe commands, with the specified priority. |
|
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. |
|
static ServiceMode |
getApplicationServiceMode()
Gets the service mode of the current application. |
|
static String |
getDefaultCorporateServiceUid()
Gets the default corporate service UID. |
|
static String |
getDefaultNonCorporateServiceUid()
Gets the default non-corporate service UID. |
|
static String |
getDefaultUndecidedServiceUid()
Get the "undecided" service UID. |
|
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. |
|
static int |
isAccessAllowed(ServiceMode sourceServiceMode,
ServiceMode destinationServiceMode)
Checks if resources from the source service are allowed to be shared with the destination service. |
|
static boolean |
isCorporateResource(String inputString)
Determines if a string identifies a corporate resource. |
|
static boolean |
isCorporateServiceUid(String serviceUid)
Checks if the specified service is a corporate service. |
|
static boolean |
isForwardingDisabledViaNonCorporateChannels()
Checks if the "Disable Forwarding of Work Content Using Personal Channels" IT policy rule is set. |
|
static boolean |
isListener(MultiServicePlatformListener listener)
Checks if a specific listener is already registered. |
|
static boolean |
isOrganizationalDataSeparationEnabled()
Checks if the "Enable Separation of Work Content" IT policy rule is set. |
|
static boolean |
isRequireWorkResourcesForConductingWorkActivitiesEnabled()
Checks if the "Require Work Resources For Conducting Work Activities" IT policy rule is set. |
|
static int |
removeListener(MultiServicePlatformListener listener)
Removes the specified listener. |
|
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 |
|---|
public static int addListener(MultiServicePlatformListener listener)
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.
listener - The listener to be added.
MultiServicePlatformConstants.SUCCESS if the listener was added successfully; otherwise
MultiServicePlatformConstants.FAILURE.
public static int addListener(MultiServicePlatformListener listener,
int 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.
priority - The priority of the listener to be added.
MultiServicePlatformConstants.SUCCESS if the listener was added successfully; otherwise
MultiServicePlatformConstants.FAILURE.
public static int addListener(MultiServicePlatformListener listener,
int priority,
long dataOfInterest)
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.
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.
MultiServicePlatformConstants.SUCCESS if the listener was added successfully; otherwise
MultiServicePlatformConstants.FAILURE.MultiServicePlatformConstantspublic static boolean isListener(MultiServicePlatformListener listener)
listener - The object that implements the MultiServicePlatformListener interface.
true if the listener is already registered, false otherwise.public static int removeListener(MultiServicePlatformListener listener)
listener - The object that the caller wants to remove from the list of listeners.
MultiServicePlatformConstants.SUCCESS if the listener was removed successfully; otherwise
MultiServicePlatformConstants.FAILURE.public static boolean isForwardingDisabledViaNonCorporateChannels()
true if forwarding corporate data via non-corporate channels is disabled;
false otherwise.public static boolean isOrganizationalDataSeparationEnabled()
true if the "Enable Separation of Work Content" IT policy rule is enabled;
otherwise false.public static boolean isRequireWorkResourcesForConductingWorkActivitiesEnabled()
true if the "Require Work Resources For Conducting Work Activities" IT policy rule is set;
otherwise false.public static boolean isCorporateResource(String inputString)
true if the string identifies a corporate resource; false otherwise.
public static int isAccessAllowed(ServiceMode sourceServiceMode,
ServiceMode destinationServiceMode)
| 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 |
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.
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.
public static int isAccessAllowed(ServiceMode serviceMode,
boolean checkProcessModule)
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.
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.public static String getDefaultNonCorporateServiceUid()
null.public static String getDefaultUndecidedServiceUid()
nullpublic static String getDefaultCorporateServiceUid()
null otherwise.public static boolean isCorporateServiceUid(String serviceUid)
serviceUid - The UID of the service to check.
true if the specified service is a corporate service; false otherwise.public static ServiceMode getApplicationServiceMode()
| 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 |
IllegalStateException - if called from a process that does not have an associated application.public static boolean suggestApplicationServiceMode(ServiceMode serviceMode)
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.
serviceMode - The new service mode being suggested for this application; may be null.
true if the new mode was accepted; false otherwise.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
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