如何使用 oim 11g 客户端 API 以编程方式获取配置资源

发布于 2024-12-23 02:21:35 字数 168 浏览 2 评论 0原文

我正在使用 oracle OIM 11g api(在 oracle.iam 包中)。我使用 oracle.iam.platform.OIMClient 类来获取所有 OIM 客户端服务,例如 UserManager。

我需要找到通过配置工作流程获得的资源。我可以使用哪项服务?我该如何使用 OIM api?

I'm using the oracle OIM 11g api (in packages oracle.iam). I use the class oracle.iam.platform.OIMClient to get all the OIM client services like UserManager.

I need to find the resources got with the provisioning workflows. Which service can I use? How can I do with the OIM api?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

青丝拂面 2024-12-30 02:21:35

下面的方法应该将所有资源导出到 XML 文件中 -

public Boolean export() {
    Boolean result = true;
    String export_object="Resource";
    try {
       FileWriter fstream = new FileWriter("OIMResources.xml");
       BufferedWriter out = new BufferedWriter(fstream);
       tcExportOperationsIntf moExportUtility = (tcExportOperationsIntf) ioUtilityFactory.getUtility("Thor.API.Operations.tcExportOperationsIntf");
       Collection<RootObject> lstObjects = moExportUtility.findObjects(export_object, "*");
       System.out.println(lstObjects);
       lstObjects.addAll(moExportUtility.getDependencies(lstObjects));
       lstObjects.addAll(moExportUtility.retrieveChildren(lstObjects));
       lstObjects.addAll(moExportUtility.retrieveDependencyTree(lstObjects));
       String s = moExportUtility.getExportXML(lstObjects, "*");    
       out.write(s);
       LOG.info(Resource + "Objects successfully exported");
       out.close();
   } catch (Exception e) {
        LOG.log(Level.SEVERE, "Exception occured while exporting OIM object" + Resource, e);
     }
   return result;
 }

The method below should export all resources into an XML file-

public Boolean export() {
    Boolean result = true;
    String export_object="Resource";
    try {
       FileWriter fstream = new FileWriter("OIMResources.xml");
       BufferedWriter out = new BufferedWriter(fstream);
       tcExportOperationsIntf moExportUtility = (tcExportOperationsIntf) ioUtilityFactory.getUtility("Thor.API.Operations.tcExportOperationsIntf");
       Collection<RootObject> lstObjects = moExportUtility.findObjects(export_object, "*");
       System.out.println(lstObjects);
       lstObjects.addAll(moExportUtility.getDependencies(lstObjects));
       lstObjects.addAll(moExportUtility.retrieveChildren(lstObjects));
       lstObjects.addAll(moExportUtility.retrieveDependencyTree(lstObjects));
       String s = moExportUtility.getExportXML(lstObjects, "*");    
       out.write(s);
       LOG.info(Resource + "Objects successfully exported");
       out.close();
   } catch (Exception e) {
        LOG.log(Level.SEVERE, "Exception occured while exporting OIM object" + Resource, e);
     }
   return result;
 }
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文