Configuring Plug-ins Oracle Fusion Middleware Online Documentation Library

7-4 Oracle Fusion Middleware Developers Guide for Oracle Identity Manager ■ One directory is configured; additional directories can be configured by simply adding more registeredDirs tags. ■ The monitoring thread is active and looks for plug-in changes every 20 seconds by default. Monitoring is typically active in development environments only. If you switch between active and inactive, you must restart the application server for the change to take effect.

7.3 Defining and Using Plug-ins

This section provides details about the key aspects of defining and setting up plug-ins: ■ Declaring Plug-ins ■ Specifying Plug-in Metadata ■ Developing Plug-ins

7.3.1 Declaring Plug-ins

To extend the functionality provided by Oracle Identity Manager, you can declare the plug-ins for the application. A plug-in has a Java class that implements the plug-in point interface. Be sure to assign unique names to all the plug-ins associated with a specific plug-in point. If the plug-in names are non-unique, an exception will be thrown during plug-in registration. Declare the plug-ins in the plugin.xml file. For example: ?xml version=1.0 encoding=UTF-8? oimplugins .... plugins pluginpoint=oracle.iam.sample.passwdmgmt.service.PasswordElement plugin pluginclass= oracle.iam.sample.passwdmgmt.custom.NumCustomPasswordElement version=1.0.1 name=num pwd element plugin pluginclass= oracle.iam.sample.passwdmgmt.custom.DictionaryPasswordElement version=1.0.1 name=Dictionary password element plugins .... oimplugins Note: Do not modify the Store value; common is appropriate in all environments. Note: Restarting the application server is required for any changes made to plug-in data in the oim-config.xml file. Note: Although these topics are presented in separate sections, they are not necessarily sequential steps. Tasks such as declaring plug-in points, their plug-ins and the plug-in metadata can be performed together in a single step. Developing Plug-ins 7-5 The XML shows two plug-in declarations. Both the plug-ins extend from the same plug-in point.

7.3.2 Specifying Plug-in Metadata

Along with each plug-in that is defined in plugin.xml, you can specify a list of properties that comprise the plug-in metadata. For an example of using the plug-in metadata, see Extending Request Management Operations on page 23-30. In this example, the metadata consists of a single property known as PasswordElementNum , with the value 1: ?xml version=1.0 encoding=UTF-8? oimplugins .... plugins pluginpoint=oracle.iam.sample.passwdmgmt.service.PasswordElement plugin pluginclass= oracle.iam.sample.passwdmgmt.custom.NumCustomPasswordElement version=1.0.1 name=num pwd element metadata name=PasswordElementNumvalue1valuemetadata plugin plugin pluginclass= oracle.iam.sample.passwdmgmt.custom.DictionaryPasswordElement version=1.0.1 name=Dictionary password element metadata name=PasswordElementNumvalue2valuemetadata plugin plugins .... oimplugins

7.3.3 Developing Plug-ins

The develop a plug-in: 1. Identify the plug-in point to extend. 2. Idenitify the Java class that implements the plug-in point interface. Package the Java class and other dependent classes into a JAR file. Put the JAR file in the lib directory. 3. Create the plugin.xml file. See Declaring Plug-ins on page 7-4 for details. 4. Identify the resource files required by the plug-in, such as property files, resource bundles, and image files. 5. Zip the entire package. An Oracle Identity Manager plug-in is distributed as a ZIP file with a specified directory structure. The directory structure is as follows: ■ The plugin.xml file: The XML file contains the metadata associated with all the plug-ins such as the plug-in point it extends, the class implementing the plug-in, name, and the version number. All the fields in the XML are Note: You can have multiple versions of the plug-in stored and the feature can request a specific version of the plug-in from the plug-in framework.