Pre-Requisite:
Initial Setup.
Please follow the link and setup the OIM client environment to use to create the OIM Objects.
Client Code Setup
tcLookupOperationsIntf API Usage:
The following tasks needs to be performed to add, update, and delete the Lookup Definition to the Oracle Identity Manager. They are1. Create the OIMClient Handle
OIMClient client= new OIMClient();client.login(username,password.toCharArray());
2. Get tcSchedulerOperationsIntf service object
tcLookupOperationsIntf lookup= client.getService(tcLookupOperationsIntf.class);3. Adding Lookup Definition
String lookupName = "Lookup.Test Lookup";lookup.addLookupCode(lookupName);
4. Adding Lookup Value to Lookup Definition
String lookupCode="basedn";String lookupValue="dc=test,dc=com";
lookup.addLookupValue(lookupName,LookupCode,lookupValue,"","");
5. Updating the Lookup Value to the Lookup Definition
lookupCode="basedn";lookupValue="ou=people,dc=test,dc=com";
Map<String, String> updateMap= new HashMap<String, String>();
updateMap.put("Lookup Definition.Lookup Code Information.Code Key", lookupCode);
updateMap.put("Lookup Definition.Lookup Code Information.Decode",lookupValue );
lookup.updateLookupValue(lookupName, lookupCode, updateMap);
6. Deleting the Lookup Code from The Lookup Definition
lookup.removeLookupValue(lookupName,lookupCode);7. Getting the Lookup Definition Values
Map<String,String> lookupPairs= new HashMap<String,String>();tcResultSet rs= lookup.getLookupValues(lookupName);
int count=rs.getRowCount();
if(count >0)
{
For(int i=0;i<count;i++)
{
lookupPairs.put(rs.getStringValue("Lookup Definition.Lookup Code Information.Code Key"),rs.getStringValue("Lookup Definition.Lookup Code Information.Decode"));
}
}