The following method will list all role associated to the user at the provided reference space stored, path.
private static List<String> getACL(
AccessControlServiceSoapBindingStub accessService,
Reference reference, Predicate pred) throws AccessControlFault,
RemoteException {
System.out.println("Getting ACL for " + reference.getUuid());
List<String> acls = new ArrayList<String>();
Predicate predicate = new Predicate();
predicate.setNodes(new Reference[] { reference });
System.out.println("doneeee1");
ACL[] aclArray = accessService.getACLs(pred, new ACE("",
Constants.CONTRIBUTOR, AccessStatus
.fromValue(AccessStatus._acepted)));
System.out.println("doneeee2");
for (ACL acl : aclArray) {
ACE[] aces = acl.getAces();
if (aces != null) {
for (ACE ace : aces) {
// System.out.println("Permissions -> " + ace.getAuthority()
// + " : " + ace.getPermission());
if (ace.getAuthority().equalsIgnoreCase("userName")) {
System.out.println("userName permission –>>> "
+ ace.getAuthority() + " ::: "
+ ace.getPermission());
}
}
}
}
return acls;
}
}