- package oimclient;
- import java.util.HashMap;
- import java.util.Hashtable;
- import java.util.List;
- import oracle.iam.platform.OIMClient;
- import oracle.iam.platform.entitymgr.vo.SearchCriteria;
- import oracle.iam.provisioning.api.ApplicationInstanceService;
- import oracle.iam.provisioning.vo.ApplicationInstance;
- public class GetAllAppInstances {
- 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());
- ApplicationInstanceService aiService = oimClient.getService(ApplicationInstanceService.class);
- SearchCriteria criteria = new SearchCriteria(ApplicationInstance.APPINST_NAME,
- "*", SearchCriteria.Operator.BEGINS_WITH);
- List<ApplicationInstance> aiList = aiService.findApplicationInstance(criteria, new HashMap<String, Object>());
- for(ApplicationInstance ai : aiList) {
- System.out.println("ai name = " + ai.getApplicationInstanceName());
- }
- }
- }
Thursday, September 3, 2015
OIM 11g R2 Getting all Application Instances Using OIM Java API's
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment