Plugin Ordering

From 389 Directory Server

(Difference between revisions)
Revision as of 19:24, 2 November 2009
Nkinder (Talk | contribs)

← Previous diff
Revision as of 19:31, 2 November 2009
Nkinder (Talk | contribs)
(Design)
Next diff →
Line 5: Line 5:
== Design == == Design ==
 +To define plug-in execution order, it will be possible to set a plug-in precedence in a plug-in configuration entry. This precedence value will then be used to determine the order in which to call the plug-ins within a given plug-in type. The precedence will be defined as an integer value between '''00-99''' with '''00''' being the highest priority and '''99''' being the lowest priority. The precedence value will be stored in the '''nsslapd-pluginPrecedence''' attribute within a plug-in configuration entry. Here is an example configuration entry:
 +
 + dn: cn=ACL Plugin,cn=plugins,cn=config
 + objectClass: top
 + objectClass: nsSlapdPlugin
 + objectClass: extensibleObject
 + cn: ACL Plugin
 + nsslapd-pluginPath: libacl-plugin
 + nsslapd-pluginInitfunc: acl_init
 + nsslapd-pluginType: accesscontrol
 + nsslapd-pluginEnabled: on
 + nsslapd-plugin-depends-on-type: database
 + nsslapd-pluginId: acl
 + nsslapd-pluginVersion: 1.2.3
 + nsslapd-pluginVendor: 389 Project
 + nsslapd-pluginDescription: acl access check plugin
 + nsslapd-pluginPrecedence: 50
 +
 +If the precedence attribute is not set for a particular plug-in, the value will default to '''50''' internally.
== Implementation == == Implementation ==

Revision as of 19:31, 2 November 2009

This document describes the design and implementation of a feature to allow Plug-in execution order to be defined.

Background

The current implementation of the SLAPI plug-in interface does not allow the execution order of plug-ins to be defined within the same plug-in type. It would be useful to plug-in developers to be able to define an order for plug-in execution. This would allow for more complex plug-in interaction, such as having a pre-operation plug-in that relies on another pre-operation plug-in completing it's job first.

Design

To define plug-in execution order, it will be possible to set a plug-in precedence in a plug-in configuration entry. This precedence value will then be used to determine the order in which to call the plug-ins within a given plug-in type. The precedence will be defined as an integer value between 00-99 with 00 being the highest priority and 99 being the lowest priority. The precedence value will be stored in the nsslapd-pluginPrecedence attribute within a plug-in configuration entry. Here is an example configuration entry:

dn: cn=ACL Plugin,cn=plugins,cn=config
objectClass: top
objectClass: nsSlapdPlugin
objectClass: extensibleObject
cn: ACL Plugin
nsslapd-pluginPath: libacl-plugin
nsslapd-pluginInitfunc: acl_init
nsslapd-pluginType: accesscontrol
nsslapd-pluginEnabled: on
nsslapd-plugin-depends-on-type: database
nsslapd-pluginId: acl
nsslapd-pluginVersion: 1.2.3
nsslapd-pluginVendor: 389 Project
nsslapd-pluginDescription: acl access check plugin
nsslapd-pluginPrecedence: 50

If the precedence attribute is not set for a particular plug-in, the value will default to 50 internally.

Implementation