Monday, November 16, 2020

How to fetch childData(Roles or Entitlements ) in OIM?

 public static HashMap<String, String> getChildData(Account resourceAccount) {

String methodName = "getChildData";

System.out.println(CLASS_NAME + "/" + methodName);

LOGGER.debug(CLASS_NAME + "/" + methodName);

HashMap<String, String> childDataMap = new HashMap<String, String>();

String childFormName = "UD_PEDIA_PC";

        String fieldName = "";

String fieldValue = "";

Map<String, ArrayList<ChildTableRecord>> childData = resourceAccount.getAccountData().getChildData();

Iterator iter = childData.entrySet().iterator();

while (true) {

String currentChildFormName;

ArrayList childFormData;

do {

if (!iter.hasNext()) {

return childDataMap;

}

Entry pairs = (Entry) iter.next();

currentChildFormName = (String) pairs.getKey();

childFormData = (ArrayList) pairs.getValue();

} while (!currentChildFormName.equals(childFormName));

Iterator var10 = childFormData.iterator();

while (var10.hasNext()) {

ChildTableRecord record = (ChildTableRecord) var10.next();

Map<String, Object> childRecordData = record.getChildData();

fieldName = (String) childRecordData.get("UD_PEDIA_PC_FIELDNAME");

fieldValue = (String) childRecordData.get("UD_PEDIA_PC_VALUE");

childDataMap.put(fieldName, fieldValue);

}

}

}

No comments:

Post a Comment

Fetch Members from Workgroup

  import java.util.ArrayList;   import java.util.Iterator;   import java.util.List;   import sailpoint.api.ObjectUtil;   import sailpoint.ob...