OIM API To Search Role Category


package com.role;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

import com.connection.Platform;

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.entitymgr.vo.SearchCriteria;

public class SearchRoleCategory {
 public static void main(String[] args) throws Exception {
  
  RoleCategoryManager roleCategoryMgr = Platform.getService(RoleCategoryManager.class);

  SearchCriteria criteria = new SearchCriteria(RoleManagerConstants.ROLE_CATEGORY_NAME, "role",
    SearchCriteria.Operator.BEGINS_WITH);
  Set retSet = new HashSet();
  retSet.add(RoleManagerConstants.ROLE_CATEGORY_NAME);
  retSet.add(RoleManagerConstants.ROLE_CATEGORY_DESCRIPTION);

  List<RoleCategory> categories = roleCategoryMgr.search(criteria, retSet, null);

  for (RoleCategory roleCat : categories) {

   System.out.println(roleCat.getEntityId() + " :: " + roleCat.getName() + " - " + roleCat.getDescription());
  }
 }
}

No comments:

Post a Comment

About OIM

Oracle Identity Management enables organizations to effectively manage the end - to - end life - cycle of user ide...

Popular Posts