- package oimclient;
- import java.util.HashSet;
- import java.util.Hashtable;
- import java.util.List;
- import java.util.Set;
- import oracle.iam.identity.rolemgmt.api.RoleCategoryManager;
- import oracle.iam.identity.rolemgmt.api.RoleManagerConstants;
- import oracle.iam.identity.rolemgmt.vo.RoleCategory;
- import oracle.iam.platform.OIMClient;
- import oracle.iam.platform.entitymgr.vo.SearchCriteria;
- public class SearchRoleCategory {
- public static void main(String[] args) throws Exception {
- Hashtable env = new Hashtable();
- env.put("java.naming.provider.url", "t3://localhost:14000");
- env.put("java.naming.factory.initial", "weblogic.jndi.WLInitialContextFactory");
- System.setProperty("java.security.auth.login.config","G:/Oracle/Middleware/Oracle_IDM1/server/config/authwl.conf");
- System.setProperty("APPSERVER_TYPE","wls");
- OIMClient oimClient = new OIMClient(env);
- oimClient.login("xelsysadm", "Welcome1".toCharArray());
- RoleCategoryManager roleCategoryMgr = oimClient.getService(RoleCategoryManager.class);
- SearchCriteria criteria = new SearchCriteria(RoleManagerConstants.ROLE_CATEGORY_NAME, "OIM",
- SearchCriteria.Operator.BEGINS_WITH);
- Set retSet = new HashSet();
- retSet.add(RoleManagerConstants.ROLE_CATEGORY_DESCRIPTION);
- retSet.add(RoleManagerConstants.ROLE_CATEGORY_NAME);
- List<RoleCategory> categories = roleCategoryMgr.search(criteria, retSet, null);
- for (RoleCategory roleCat : categories) {
- System.out.println( "The role name is "+roleCat.getName() + " & description is " + roleCat.getDescription());
- }
- }
- }
Thursday, September 3, 2015
OIM 11G R2 Searching roleCategory
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment