Skip to main content

Posts

Showing posts from November, 2014

Account Provisioning through API - OIM 11g R2

public class AccountManagement { OIMClient client=ClientOIM.initialise(); oracle.iam.provisioning.api.ApplicationInstanceService appInstanceService=client.getService(oracle.iam.provisioning.api.ApplicationInstanceService.class); ProvisioningService provisioningService=client.getService(ProvisioningService.class); ClientOIM oim=new ClientOIM(); public void provisionAccount(String accName,String userID) { try { if (accName!=null && !accName.equals("") && userID!=null && !userID.equals("") ) { ApplicationInstance appInstance=appInstanceService.findApplicationInstanceByName(accName); long appKey=appInstance.getApplicationInstanceKey(); System.out.println("AppKey is "+appKey); FormInfo formInfo=appInstance.getAccountForm(); String formKey=String.valueOf(formInfo.getFormKey()); System.out.println("formKey is "+formKey); HashMap parentData=new HashMap(); /*Madator

Searching and creating Organization Through API- OIM 11g R2

public class OrgManagement { static OrganizationManager orgManager=null; static OIMClient client=null; static Organization organization=null; public static void createOrg(String orgName, String orgType) { try { client=ClientOIM.initialise(); if (orgName!=null && orgType!=null) { orgManager=client.getService(OrganizationManager.class); System.out.println("OrgManagement :: createOrg :: org is "+orgManager); HashMap<String, Object> mapAttrs = new HashMap<String, Object>(); mapAttrs.put(OrganizationManagerConstants.AttributeName.ORG_NAME.getId(),orgName); mapAttrs.put(OrganizationManagerConstants.AttributeName.ORG_TYPE.getId(),orgType); Organization org=new Organization(null,mapAttrs); orgManager.create(org); System.out.println("OrgManagement :: createOrg ::  Organization created"); } }  catch (OrganizationManagerException e) { // TODO Auto-generated catch block e.printStackTrace();