It's all about IAM

OIM 11g R2 PS3 : API Usage: AdminRoleService

Oracle has introduced new apis for managing the admin roles. You can create/modify/assign admin roles. Here's the usage of these apis:

Note: These apis can be run inside OIM only.


AdminRoleService adminRoleService = Platform.getService(AdminRoleService.class);
String roleDisplayName = null;
String roleDescription = null;
String searchBase = null;
long roleID = 0L;
String membershipRuleInternal = null;
SearchRule membershipRule = null;
List capabilities = null;
AdminRole adminRole = adminRoleService.getAdminRole(roleName);
roleName = adminRole.getRoleName();
roleID = adminRole.getRoleId();
roleDescription = adminRole.getRoleDescription();
roleDisplayName = adminRole.getRoleDisplayName();
capabilities = adminRole.getCapabilities();
membershipRule = adminRole.getMembershipRule();
membershipRuleInternal = adminRole.getMembershipRuleInternal();
System.out.println("Role Name :: " +  roleName + " Role Display Name :: " + roleDisplayName );
System.out.println("Membership Rule :: " +  membershipRule + " Capabilities Size :: " + capabilities.size() );
System.out.println("Role ID :: " +  roleID + " Role Description :: " + roleDescription);


API Output:

Role Name :: OrclOIMCertificationViewer Role Display Name :: Certification Viewer
Membership Rule :: null Capabilities Size :: 0
Role ID :: 23 Role Description :: Role can view all certification definitions, jobs, and instances.

No comments:

Post a Comment