Invoke the RepositoryServiceService object’s
readAccessControlList method and pass the URI of the resource as a parameter. The method returns an
AccessControlList object. Pass
null for the second parameter.
Retrieve the AccessControlList object’s
usersWithPermissions field, which is an
object array containing strings representing the user identifiers. In this example, the list of users is printed to the screen.
Create an object array that will be used to store the list of permissions, and add the preferred permissions to the array, which must be specified as strings. In this example, traversal and read permissions are specified for a folder; therefore, the values
"Traverse" and
"Read" are added to the list.
Invoke the default constructor for the AccessControlEntry class to create a new object needed for storing the permissions, and assign the permissions object to the
AccessControlEntry object’s
permissions field.
Create an object array, store the
AccessControlEntry object in it, and assign the array to the
AccessControlList object’s
entries field.
Create an object array, store the user identifier in it, and assign the array to the
AccessControlList object’s
usersWithPermissions field.
Invoke the RepositoryServiceService object’s
writeAccessControlList method and pass in the following parameters:
|
•
|
A boolean value used to determine whether to propagate the permissions to all path-contained resources if the resource is a collection ( com.adobe.repository.infomodel.bean.ResourceCollection). In this example, the value true is specified.
|
|
•
|
A boolean value used to determine whether the propagate value was specified. In this example, a value of true is specified.
|
|
•
|
Pass null for the remaining parameter.
|
Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/sdkHelp/repositoryAccessingFiles.127.4.html