共用方式為


UserPolicy.create(TemplateDescriptor, ...) asynchronous method

Asynchronously creates a new UserPolicy object from a template descriptor.

Signature

public static IAsyncControl create(
                                     TemplateDescriptor templateDescriptor,
                                     String userId,
                                     AuthenticationRequestCallback authenticationContext,
                                     int userPolicyCreationFlags,
                                     Map<String,String> signedAppData,
                                     LicenseMetadata licenseMetadata,
                                     CreationCallback<UserPolicy> callback)  
                              throws InvalidParameterException

Parameters

Name Datatype Notes
templateDescriptor
TemplateDescriptor
userId
String
A unique user identifier such as an email address.
This userId is used to discover the RMS service instance (either ADRMS server or Azure RMS) that the user's organization is using. userId is used for caching user policy as well for offline usage.
authenticationContext
AuthenticationRequestCallback
userPolicyCreationFlags
int
For more information, see UserPolicyCreationFlags)
signedAppData
Map<String,String>
licenseMetaData
LicenseMetadata
If you want to enable document tracking, it must be initialized before creating the UserPolicy with the TemplateDescriptor object.
For more information, see How to: Use document tracking.
callback
CreationCallback<UserPolicy>>

Throws

InvalidParameterException

Returns

A IAsyncControl

Defined in

UserPolicy.java

Supported Platforms

Minimum supported OS version
Android 4.0.3 (API level 15)