- package com.oimacademy.org;
- import java.util.Calendar;
- import oracle.iam.identity.orgmgmt.api.OrganizationManager;
- import oracle.iam.identity.orgmgmt.vo.Organization;
- import com.oimacademy.connection.Platform;
- import oracle.iam.platform.authopss.vo.AdminRole;
- import oracle.iam.platform.authopss.vo.AdminRoleMembership;
- import oracle.iam.platformservice.api.AdminRoleService;
- public class CreateOrganizations {
- protected static OrganizationManager m_orgManagerService ;
- public static int getRandomNumber() {
- java.util.Random r = new java.util.Random(Calendar.getInstance()
- .getTimeInMillis());
- int randint = Math.abs(r.nextInt()) % 1000;
- return randint;
- }
- public static String createorg() throws Exception {
- m_orgManagerService = (OrganizationManager) Platform.getService(OrganizationManager.class);
- String result=null;
- Organization org = new Organization();
- for(int i=1; i< 1000;i++){
- org.setAttribute("Organization Name", "TEST_ORG_"+i);
- org.setAttribute("Organization Customer Type", "System");
- org.setAttribute("Organization Status", "Active");
- result = m_orgManagerService.create(org);
- System.out.println("Organization Key : " + result);
- AdminRoleService arsi = Platform.getService(AdminRoleService.class);
- AdminRole ar= arsi.getAdminRole("OrclOIMUserViewer");
- AdminRoleMembership arm = new AdminRoleMembership("5", ar, result, true);
- arsi.addAdminRoleMembership(arm);
- AdminRole ar1= arsi.getAdminRole("OrclOIMOrgAdministrator");
- AdminRoleMembership arm1 = new AdminRoleMembership("5", ar1, result, true);
- arsi.addAdminRoleMembership(arm1);
- System.out.println("done"+i);
- }
- System.out.println("Done");
- //System.out.println("Updated Password with key "+updateOrgPasswordPolicy(result));
- return result;
- }
- public static void main(String[] args) throws Exception {
- CreateOrganizations createorgObj = new CreateOrganizations();
- createorgObj.createorg();
- //createorgObj.deleteOrganizations();
- }
- }
Oracle Identity Manager(OIM) is the Provisioning Solution from oracle. This page contains an index with references to all OIM related posts in the oracle identity manager Academy blog. The posts included herein are intended to provide oracle identity management customers and developers with technical information about best practices for implementing OIM based solutions.
OIM Create Bulk Organizations API
Subscribe to:
Post Comments (Atom)
-
Connection Related API's : OIM DB Connection/ Data Source connection OIMClient API / OIMConnection API OIM Platform API to getSer...
-
Error : Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.springframewor...
-
In this post, we set the middle name as “MiddleName” if user does not provide middle name during user create operation. Below are high...
No comments:
Post a Comment