- package com.oimacademy.NeedEvaluate;
- import java.util.HashMap;
- import java.util.List;
- import com.oimacademy.connection.Platform;
- import oracle.iam.identity.rolemgmt.utils.MembersLookupable.SortOrder;
- import oracle.iam.platform.authopss.vo.AdminRole;
- import oracle.iam.platform.entitymgr.vo.SearchCriteria;
- import oracle.iam.platformservice.api.AdminRoleService;
- public class AdminRoleSearchAPI {
- public static void main(String args[]){
- AdminRoleService aRoleServ= Platform.getService(AdminRoleService.class);
- HashMap<String,Object> configParams = new HashMap<String,Object>();
- configParams.put("STARTROW", 1);
- configParams.put("ENDROW",50);
- configParams.put("SORTORDER",SortOrder.DESCENDING);
- configParams.put("SORTEDBY","role_id");
- SearchCriteria criteria1=new SearchCriteria("role_display_name","OrclOIMApplicationInstanceAdministratorRole",SearchCriteria.Operator.EQUAL);
- SearchCriteria criteria2=new SearchCriteria("scoped","0",SearchCriteria.Operator.EQUAL);
- SearchCriteria criteriaFinal1=new SearchCriteria(criteria1,criteria2,SearchCriteria.Operator.OR);
- SearchCriteria criteriaFinal2 = new SearchCriteria(criteria2, criteria1, SearchCriteria.Operator.OR);
- try{
- System.out.println("========== First query ==========");
- searchRolesPerCriteria(aRoleServ, null, criteriaFinal1);
- System.out.println("========== Second query ==========");
- searchRolesPerCriteria(aRoleServ, null, criteriaFinal2);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- private static void searchRolesPerCriteria(AdminRoleService aRoleServ, HashMap<String, Object> configParams,
- SearchCriteria criteriaFinal1) throws Exception {
- List<AdminRole> adminRoleList = aRoleServ.search(criteriaFinal1, configParams);
- System.out.println("Using Search: List Size [" + adminRoleList.size() + "]");
- }
- }
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 Search Admin 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