Thursday, 30 June 2011

Code to fetch all the groups available in OIM

public ArrayList getAllGroups(String groups){
ArrayList groupAll = new ArrayList();
String str = "";
HashMap userMap = new HashMap();
try {

userMap.put("Groups.Group Name", groups);
tcResultSet moResultSet = moGroupUtility.findGroups(userMap);
for (int i=0; i < moResultSet.getRowCount(); i++){ moResultSet.goToRow(i); str = moResultSet.getStringValue("Groups.Group Name"); groupAll.add(str); System.out.println("All Groups==>"+str);
}
}catch(Exception e){
e.printStackTrace();
}
return groupAll;
}

No comments:

Post a Comment