This is an example of getting the List of AuthorizationInfoInterface instances for more than one Identity object. Note that the return value differs from the single Identity usage in Example 3. Because AuthorizationUtilInterface.getAuthorizations() will return Permission Info for multiple Identities, it is necessary to encapsulate the PermissionInfoInterface List for each returned Identity. AuthorizationInfoInterface does exactly that.
try
{
MetadataInterface object; // any Services-level MetadataInterface object type will work here (your code must fill this in)
AuthorizationUtilInterface authUtil = object.getAuthorizationUtil();
List <IdentityInterface>identities; // A List of Identity objects (probably from the List returned by Example 2.)
List <String>permissions = null; // Indicate to get all applicable Permissions for the object
List <AuthorizationInfoInterface>authInfoList = authUtil.getAuthorizations(identities, permissions);
}
catch (ServiceException e)
{
e.printStackTrace();
}
catch (RemoteException e)
{
e.printStackTrace();
}