- package oimclient;
- import java.util.Hashtable;
- import java.util.List;
- import oracle.iam.platform.OIMClient;
- import oracle.iam.provisioning.api.EntitlementService;
- import oracle.iam.provisioning.vo.Entitlement;
- public class CreateEntitlement {
- 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();
- System.out.println("Connection Successfull");
- EntitlementService entSvc = oimClient.getService(EntitlementService.class);
- Entitlement ent = new Entitlement();
- ent.setObjectKey(4);
- ent.setFormKey(9);
- ent.setFormFieldKey(29);
- ent.setItResourceKey(4);
- ent.setEntitlementCode("4~TestEntitle");
- ent.setEntitlementValue("TestEntitle");
- ent.setDisplayName("TestEntitle");
- ent.setDescription("TestEntitle");
- ent.setLookupValueKey(2479);
- ent.setValid(true);
- System.out.println("Entitlement Created");
- entSvc.addEntitlement(ent);
- }
- }
Thursday, September 3, 2015
OIM 11g R2 Creating EntitleMent Using OIM Java API's
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment