Pre-Requisite
Please follow the link and pre pare for OIM environment customization
OIM Client Code Setup
Searching User
Create the Search Criteria
SearchCriteria criteria = new SearchCriteria("User Login", <User Namee>, SearchCriteria.Operator.EQUAL);
The above search criteria is username is equal against with OIM user database.
Creating User Manager Object
UserManager usermgr = (UserManager) client.getService(UserManager.class);
Setting the Return Attribute
Set
retAttrs.add("First Name");
retAttrs.add(Last Name");
retAttrs.add("Employee Number");
Invoking the Seach Process
List<User> users = usermgr.search(criteria, retAttrs, null);
Iterating the Search Result
int size=users.size();
for (int i = 0; i < size; i++) { User user=users.get(i); Map
Set
for (String string : keys)
{
Object attr=attrs.get(string);
System.out.println("Key "+ string + " value "+attr);
}
}
References
Oracle Identity Manager API
Oracle Identity Manager Developer Guide
I was searching for this .....thanks to post this nice article
ReplyDeleteGetSecurityAttributeChanges
I was searching for this .....thanks to post this nice article
ReplyDeleteListFundsBySymbol
Whathappen if we pass empty hashSet as return attributes? will it return all the attributes or return none?
ReplyDelete