What is the OIMDAO
OIMDAO is a small (current size is slightly more than 300K) library which allows you access Oracle Identity Manager 11g repository database directly. The word directly means you neither need any other libraries from oracle nor you have to have a running OIM server instance.
Currently the library consists of 129 Java classes, each providing access to one OIM DB table.
Disclaimer: OIMDAO is an application that is not supported by Oracle. It operates directly on OIM repository database, which is not an advisable course of action outside a development environment. Using it in production may cause support issues for users if they raise an SR with Oracle. So use it at your own risk.
What the OIMDAO is not
- Currently OIMDAO does not provide you direct API to so called business operations, like create OIM User, Form or Resource, since each of these operations involves creation of multiple entities, but it allows to write your own code for these operations, and I'll provide you with some examples below.
- OIMDAO doesn't let you do anything with Oracle Metadata Store, which is a significant part of OIM. Use other means to manage metadata, for example, APIs described at this site.
To whom may it concern?
The library is primarily intended for using by OIM experts who also feel themselves Java programmers.
It allows you to
- create a new entity and/or update an existing entity
- load an existing entity into memory, and navigate through entity dependencies, the data is being lazily fetched on demand
- delete an entity along with all dependencies, the thing usually impossible through OIM APIs for most entities
- marshal an entity into XML along with all dependencies, and un-marshal it back to memory
Though I myself use it in my every day's work, I make changes to it very often. So the APIs haven't stabilized still. The latest release is r678.
Releases before r356 are compatible with OIM 126.96.36.199, from r356 on the library works with 188.8.131.52 either.
How to get it
Write me at tsichevski at gmail dot com, or contact me using my account at LinkedIn below, and I'll send you the download link.
How it works
Classes, fields and accessors
- the library is a set of Java classes
- each class corresponds to one OIM table.
- each class has a field for each table column. The type of the field is either one of Java built-in types like String, long etc., or field refers other entity
- all references are loaded automatically before you access them
- classes which have "children", have additional artificial fields with the sets of children.
- each field, which is not a "child set", has getter and setter. "Child sets" have getters only.
The delete() method
Each class implements delete() method, which lets you delete the corresponding database record with all dependent records. So it is possible, for example, to recursively wipe out entire organizational tree with all users, all other object having reference to these organizations and user and so on. The feature is invaluable when you explore OIM features, run unit tests etc. and want to undo your changes and return your database to some initial state.
Classes and naming conventions
I've done my best trying to make class names meaningful. When possible, these class names correspond logical entity names used in OIM services. For example, the name of the DAO class for USR table is User, for the ACT table - Organization.
The same is usually not true for Java class field names. The field names were usually created from corresponding to table column names, e.g. the column name ADP_DATA_LEVEL in the table ADP is transformed to the dataLevel field name.
The library uses Hibernate to access the database. OIMDAO has been tested with the releases of Hibernated starting from 3.6.3-Final up to 4.1.7-Final.
- Getting Started
- examples in the idm4j/oim/dao/examples directory. The most complete example is the MSADExamples.java file, which demonstrates how to completely wipe MSAD connector out of OIM repository.
- Not all OIM tables are covered by the library, only the ones I was interested in so far. Here is the full list of supported Entities tables. If you need support for other tables, let me know.
- The library comes to you AS-IS, it might have bugs, so use it with caution, back-up your DB before changing anything in the DB with this library.
- Vladimir Tsichevski http://www.linkedin.com/in/tsichevski
Any feedback from users will be greatly appreciated. I'd like to now what do you use this library for, to receive bug reports, suggestions and thanks :-)