6 Replies Latest reply: Jan 16, 2013 1:20 AM by 965440 RSS

    how to use 11g API for custom adaptars

    965440
      Hi,
      I am writting custom adaptar for OIM 11g. Using old api, I am able to write the code and that is woring fine. But I want to use 11g api. Please let me know how to pass the dataprovider in 11g api.

      for example, i have wriiten the below code to get the userkey. and after creating the jar I am doing the maping in design console. dataprovider is maped to database reference. how to achive the same using 11g api.

      in the below wxample i have used tcUserOperationsIntf but I want to use oracle.iam.identity.usermgmt.api.UserManager. Please let me know how to connect with OIM witout using tcDataProvider. using client login we can do that, but in that case we need to hardcode url, id, password etc I think.


      public long findUserKey(String employeeid,tcDataProvider dataProvider) {
                
                HashMap map = new HashMap();
                map.put("Users.User ID", employeeid);
                long userkey=0;

                try{
                     tcUserOperationsIntf userOperationsintf = (tcUserOperationsIntf)tcUtilityFactory.getUtility(dataProvider,"Thor.API.Operations.tcUserOperationsIntf");
                     tcResultSet result = userOperationsintf.findUsers(map);
                     if(result.getRowCount()!=1){
                          return 0;
                     }else{
                          userkey = result.getLongValue("Users.Key");
                     }
                }catch (Exception e) {

                }
                
                return userkey;
           }