Requirement:
Find UDF value using OIM 11g API
Solution
Here is the sample code:
Create a UDF say USR_UDF_OTHER = Other Attribute
SearchCriteria criteria = new SearchCriteria("User Login", "RDEWAN", SearchCriteria.Operator.EQUAL);
UserManager usrService = oimClient.getService(UserManager.class);
Set retAttrs = new HashSet();
UserManager usrService = oimClient.getService(UserManager.class);
Set
retAttrs.add("Other Attribute");
List <User> users = usrService.search(criteria, retAttrs, null);
String otherAttribute = (String) users.get(0).getAttribute("Other Attribute");
System.out.println("Value for otherAttribute :: " + otherAttribute);
Other Way
User user = usrService.getDetails("User Login", "RDEWAN", null);
HashMap mapAttrs = user.getAttributes();
String otherAttribute= (String) mapAttrs.get("Other Attribute");
System.out.println("Value for otherAttribute :: " + otherAttribute);
Other Way
User user = usrService.getDetails("User Login", "RDEWAN", null);
HashMap mapAttrs = user.getAttributes();
String otherAttribute= (String) mapAttrs.get("Other Attribute");