A practical elearning platform

Using OIM PrePopulate Adapter – Prepopulate OU Lookup/Container DN for OUD, AD or LDAP

Develop PrePopulate Adapter in OIM 11.1.2.3, Prepopulate Container DN in OUD
  1. Develop the Pre-Populate Adapter Code in Jdeveloper 11.1.2.3, deploy it as jar and copy to OIM Node.

package com.tutionbooks;
import java.util.logging.Level;

import oracle.iam.identity.exception.UserSearchException;
import oracle.iam.identity.usermgmt.api.UserManager;
import oracle.iam.identity.usermgmt.api.UserManagerConstants;
import oracle.iam.identity.usermgmt.vo.User;
import oracle.iam.platform.Platform;
import oracle.iam.platform.authz.exception.AccessDeniedException;
import oracle.iam.platform.entitymgr.vo.SearchCriteria;
import Thor.API.Exceptions.tcAPIException;
import Thor.API.Exceptions.tcColumnNotFoundException;
import Thor.API.Exceptions.tcFormNotFoundException;
import Thor.API.Exceptions.tcInvalidLookupException;
import Thor.API.Exceptions.tcInvalidValueException;
import Thor.API.Exceptions.tcNotAtomicProcessException;
import Thor.API.Exceptions.tcProcessNotFoundException;
import Thor.API.Exceptions.tcRequiredDataMissingException;
import Thor.API.Exceptions.tcVersionNotDefinedException;
import Thor.API.Exceptions.tcVersionNotFoundException;
import Thor.API.Operations.tcFormDefinitionOperationsIntf;
import Thor.API.Operations.tcFormInstanceOperationsIntf;
import Thor.API.Operations.tcLookupOperationsIntf;
import Thor.API.tcResultSet;
import java.util.Calendar;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Random;
import java.util.Set;

public class SamplePrePop {
public SamplePrePop() {
super();
}
public String getLookupDecode(String lookupName, String codeKey) throws tcAPIException,
tcInvalidLookupException,
tcAPIException,
tcColumnNotFoundException {

final String methodName = “getLookupValues”;

tcLookupOperationsIntf lookupIntf = null;
lookupIntf = Platform.getService(tcLookupOperationsIntf.class);

String decodeKey = “”;

tcResultSet lookupResultSet;
lookupResultSet = lookupIntf.getLookupValues(lookupName);
for (int i = 0; i < lookupResultSet.getRowCount(); i++) {
lookupResultSet.goToRow(i);
if (!codeKey.equals(lookupResultSet.getStringValue(“Lookup Definition.Lookup Code Information.Code Key”))) {
} else {
decodeKey = lookupResultSet.getStringValue(“Lookup Definition.Lookup Code Information.Decode”);
}
}

return decodeKey;

}

}


2. Deploy the pre-populate adapter using UploadJarsDeploy the pre-populate adapter using UploadJars :

export JAVA_HOME=/stage/jdk1.7.0_80/
export PATH=$JAVA_HOME/bin:$PATH
export ANT_HOME=/d01/Weblogic/FMW/modules/org.apache.ant_1.7.1
export PATH=$ANT_HOME/bin:$PATH
export APP_SERVER=weblogic
export OIM_ORACLE_HOME=/d01/Weblogic/FMW/Oracle_IAM1/
export MW_HOME=/d01/Weblogic/FMW/
export WL_HOME=/d01/Weblogic/FMW/wlserver_10.3/
export DOMAIN_HOME=/d01/Weblogic/FMW/user_projects/domains/OIMDomain/

cd /d01/Weblogic/FMW/Oracle_IAM1/server/bin

./UploadJars.sh

xelsysadm/Oracle123

t3://idm.tutionbooks.com:14000

weblogic.jndi.WLInitialContextFactory

1.JavaTasks

/stage/sourcecodes/CustomOUPrePopulate.jar

Do u want to load more jars [y/n] :n

Upload jar executed successfully

Verify: check the OIMHOME_JARS table for the jar file.


3.  Create a new lookup or use existing OU lookup – Lookup.LDAP.Organization

Lookname : lookup.com.tutionbooks.OUprePop

Codekey : TargetAppITRes~People

DecodeKey: 9~ou=People,dc=target,dc=com


4. Define the pre-populate adapter using adapter factory and compile it 

5. Pre-populate the Container DN form field in the OUD process form

6. Test the pre-population of Container DN


How to develop Pre-Populate Adapter (Video):

https://www.tutionbooks.com/unit/oimdev09-development-usage-prepopulate-adapter/?id=3942

0 Responses on Using OIM PrePopulate Adapter - Prepopulate OU Lookup/Container DN for OUD, AD or LDAP"

Leave a Message