Create the Directory Structure for the Scheduled Task

6-6 Oracle Fusion Middleware Developers Guide for Oracle Identity Manager 7 Developing Plug-ins 7-1 7 Developing Plug-ins The Service Framework in Oracle Identity Manager enables you to extend the platform by adding new services. Sometimes, the existing services can be extended or modified to suit new requirements. Oracle Identity Manager supports this requirement by means of the Plug-in Framework. This chapter explains basic features of the plug-in framework and how to perform common tasks to customize your environment using plug-ins. The topics include: ■ Background of the Plug-in Framework ■ Configuring Plug-ins ■ Defining and Using Plug-ins ■ Registering Plug-ins ■ About Mapped Values ■ Plug-in Points

7.1 Background of the Plug-in Framework

A plug-in is software that extends the functionality of features provided by Oracle Identity Manager. The plug-in framework enables you to define, register, and configure plug-ins, which extend the functionality provided by features. Plug-ins can be predefined or custom-developed, and they are utilized at plug-in points. A plug-in point is a specific point in the business logic where extensibility can be provided. An interface definition called the plug-in interface accompanies such a point. Users can extend the plug-in interface based on the business requirements and register them as plug-ins. This section describes the plug-in framework in the following topics: ■ About the Plug-in Framework ■ About Plug-in Stores ■ Steps for Developing Plug-ins

7.1.1 About the Plug-in Framework

The plug-in framework provides Oracle Identity Manager with a number of added capabilities. For example: ■ Services can define plug-in points where functionality can be extended. For example, the notification engine uses a default provider to send e-mail 7-2 Oracle Fusion Middleware Developers Guide for Oracle Identity Manager notifications. This provider is set up as a plug-in point so that a custom e-mail provider can be implemented. ■ Services can discover all the plug-ins defined for a particular plug-in point. ■ Plug-ins can be loaded from multiple sources. Feature developers do not need to be concerned about where the plug-ins are stored or with how they are loaded. ■ Developers can change the plug-in code without needing to re-register the plug-in. Note: This is possible only when the plug-in is stored on the filesystem.

7.1.2 About Plug-in Stores

The plug-in framework can store plug-ins in two types of stores: ■ File system ■ The Oracle Identity Manager database When looking for plug-ins, the framework first examines plug-ins registered in the database, and looks in the file system.

7.1.2.1 File Store

The File Store consists of one or more directories on the Oracle Identity Manager host and is primarily used in development environments. This type of store is not appropriate for a production environment. File storage is convenient for the developer since there is no need to explicitly register the developed plug-ins with a file store. Users can just drop in the plug-in zips or exploded plug-in directory to the designated locations. By default, Plug-in framework looks for the plug-ins under the OIM_HOMEplugins directory. Additional plug-in directories can also be specified. If a monitoring thread is enabled, then the plug-in framework monitors all the additions, modification, and deletions of plug-in zip files under the registered plug-in directories in the file system, and automatically reloads the plug-ins. Plug-in metadata such as name, version, and ID is read from the plug-in zip and is maintained in memory. This metadata is updated based on any file changes. The latest plug-in zip file is considered to be the current version of the plug-in. For details about how to configure the file store, see Section 7.2, Configuring Plug-ins .

7.1.2.2 Database Store

Plug-ins can be stored in the Oracle Identity Manager database, so that they are accessible from any node in a cluster. The Plug-in Framework uses Operation DB as the database store. This type of store is appropriate for a production environment. You must explicitly register any plug-ins that are stored in the database. You can use the Plugin Registration Utility, which is a command-line tool, to register and deregister plug-ins. You can also use the registerPlugin API for this purpose. See Section 7.4, Registering Plug-ins for more information about registering plug-ins. Note: After registering a plug-in, the server must be restarted. However, restarting the server might also depend on the feature that defines the plug-in point.