This is an example of getting the List of MdAuthorizationInfo instances for more than one Identity object. Note that the return value differs from the single Identity usage in Example 3. Because MdAuthorizationUtil.getAuthorizations() will return Permission Info for multiple Identities, it is necessary to encapsulate the MdPermissionInfo List into an MdAuthorizationInfo instance for each Identity.
try
{
CMetadata object; // any SAS CMetadata object type will work here (your code must fill this in)
MdAuthorizationUtil authUtil = object.getAuthorizationUtil();
List <Identity>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 <MdAuthorizationInfo>authInfoList = authUtil.getAuthorizations(identities, permissions);
}
catch (MdException e)
{
e.printStackTrace();
}
catch (RemoteException e)
{
e.printStackTrace();
}