Está en la página 1de 13

LAB 1: CREATE JAVA CODE

Last Update: 2010-04-19


Next:
LAB 2: CREATE ADAPTER FACTORY & IT RESOURCE

INTRODUCTION
The Oracle Identity Manager is using java technology to create the connector for connect to target system. Java code will be
used for provisioning, de-provisioning, or reconciliation data user which related to creation new user, update role user, and disable user in
target system.
Basically, all java code will be load from Oracle Identity Manager using adapter factory component in Oracle Identity Manager.
Every function or module inside java code can be called by adapter factory component.

CONTENTS
CREATE NEW PROJECT
CREATE MODULE OR FUNCTION
ADD EXTERNAL ARCHIVES FORM OTHER JAR FILE
EXPORT TO JAR FILE

EXERCISES
CREATE NEW PROJECT
PURPOSE
In this exercise, you will create new java project using eclipse java editor tool.

STEPS
1. Click eclipse shortcut
2. Select File -> New -> Java Project

3. Enter Database for project name


4. Click Finish
After you click finish you will see at left side in eclipse tool new project java created

5. Right click at src and continue select New -> Package

6. Enter database for Java Package name


7. Click Finish
After you click finish you will see new package create under scr

8. Right click at package database


9. Select New -> Class

10. Enter MyDatabase at class name


11. Click Finish
After you click finish you will see new class will created in eclipse work area. And you can continue to create function or module
inside this class java code

CREATE MODULE OR FUNCTION


PURPOSE
In this exercise, you will create function or module inside class java that has been created previously.
STEPS
1. Create the title function with function name CreateUser

2. You need to define parameters attribute as input parameters to this class


Explanation about parameters:
No
Parameter
Note
1
Driver
Basic driver that will be used by Java to connect to database
2
URL
Format information database which content of IP Address, PORT, and SID
3
UserID
User service account for OIM connect to target system
4
Password
Password for service account
5
ulogin
User login that will be created in database
6
upass
Password for user login

3. Create exception inside this class to catch some invalid or incorrect execution some core function inside this class

4. Enter java code for creation new account in database

5. Enter import function to load other class

6. Create main class function

7. Create instantiate object to CreateUser class

8. Call function from main class function

ADD EXTERNAL ARCHIVES FORM OTHER JAR FILE


PURPOSE
In this exercise, you will add external JAR file that to be used as reference other class function.
STEPS
1. Right click at Database Java Project Name, continue to select build path -> add external archives

2. Open or search other JAR file and click Open

EXPORT TO JAR FILE


PURPOSE
In this exercise, you will export java code to JAR file, so that we use it in adapter factory.
STEPS
1. Right click at Database Java Project Name, continue to select Export

2. Select Java -> JAR file and click Next

3. Select Browse.. and enter the name JAR file Database.jar then click Finish

También podría gustarte