- package com.oimacademy.role;
- import com.oimacademy.connection.Platform;
- import oracle.iam.identity.rolemgmt.api.RoleManager;
- import oracle.iam.identity.rolemgmt.vo.Role;
- public class CreateRoles {
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- new CreateRoles(). createRolesinOIM();
- }
- public void createRolesinOIM(){
- try{
- RoleManager rm = Platform.getService(RoleManager.class);
- for (int i=2;i<3;i++){
- Role r = new Role("test"+i);
- r.setName("test"+i);
- r.setDisplayName("test"+i);
- r.setDescription("Load roles..!");
- rm.create(r);
- System.out.println(i);
- }
- }catch (Exception e){
- e.printStackTrace();
- }
- }
- public static String createRole(){
- String roleKey="";
- try{
- RoleManager rm = Platform.getService(RoleManager.class);
- Role r = new Role("TestRole");
- r.setName("TestRole");
- r.setDisplayName("TestRole");
- r.setDescription("Load roles..!");
- rm.create(r);
- //System.out.println(i);
- }catch (Exception e){
- e.printStackTrace();
- }
- return roleKey;
- }
- }
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 API To create Role/Roles
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