Xpert.ivy Extension Mechanism

There are other ways to extend Xpert.ivy than with the process elements mentioned above. You may want to start your own code during the startup of the Xpert.ivy Server, for example to connect to your ERP system. You may have a product that administrates your users and you want to use the same users also in Xpert.ivy. For such kind of extension or integration Xpert.ivy provides the Xpert.ivy extension mechanism.

Xpert.ivy provides some points in its code where 3rd party code can be executed. These points are called extension points. Each extension point defines an interface that implementors (extensions) of the extension point have to implement. Because Xpert.ivy has to know what extensions are available for a given extension point, a extension class must be configured as an extension either using an *.extensions file or using the Eclipse plugin extension point mechanism (See Eclipse documentation for more details).

Warning

The Eclipse plugin extension point mechanism can only be used in Xpert.ivy Designer to configure a extension for an Xpert.ivy extension point. Since Xpert.ivy Server is not build upon an Eclipse runtime the extension point mechanism of Eclipse does not work with the server.

Extensions File

An extension class can be configured as an extension for a Xpert.ivy extension point by creating a *.extensions file and putting it into the directory configuration/extensions inside a Xpert.ivy Designer or Server installation directory. The *.extensions file is an XML file that must fulfil the following XML schema:

Figure 20.2. Extension File XML Schema

Extension File XML Schema


The schema allows to define multiple extension points in a singe file. For each extension point multiple extensions can be specified. An extension point is identified by the interface name and the bundle in which the interface is defined. An extension is identified by the class name that implements the extension point interface and its bundle in which the class is located.

Note

There is an *.extensions file already in the configuration/extensions directory called ivy.extensions. It is possible to add your extension configurations to the ivy.extensions file. Note, that it is not a good practice to do so, because the ivy.extensions file may be overwritten if you upgrade to a new version. Best practice is to write your own company.extensions file.

The following part shows the ivy.extensions file to give you an idea how an *.extensions file looks like:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<extensionPoints>
  <extensionPoint 
        interface="ch.ivyteam.ivy.security.IExternalSecuritySystemProvider" 
        bundle="ch.ivyteam.ivy.security">
    <extension bundle="ch.ivyteam.ivy.security" 
        class="ch.ivyteam.ivy.security.internal.ivy.IvySecuritySystemProvider"/>
    <extension bundle="ch.ivyteam.ivy.security" 
        class="ch.ivyteam.ivy.security.internal.ads.MicrosoftActiveDirectorySecuritySystemProvider"/>
    <extension bundle="ch.ivyteam.ivy.security" 
        class="ch.ivyteam.ivy.security.internal.nds.NovellDirectoryServiceSecuritySystemProvider"/>
  </extensionPoint>
</extensionPoints>

In this file three extensions for the extension point IExternalSecuritySystemProvider are configured.

Installation

You have to do the following steps to install your extensions in Xpert.ivy Designer:

  1. Stop Xpert.ivy Designer.

  2. Copy your plugin (bundle) that contains your extension classes to the plugins directory inside the Xpert.ivy Designer installation directory.

  3. If you do not use the Eclipse plugin extension point mechanism to configure your extensions, copy your *.extensions file with the configuration of your extensions to the configuration/extensions directory inside the Xpert.ivy Designer installation directory.

  4. Restart Xpert.ivy Designer.

To install your extensions on the Xpert.ivy Server follow these steps:

  1. Stop Xpert.ivy Server.

  2. Copy your jar file that contains your extensions class(es) into the lib/shared directory inside the Xpert.ivy Server installation directory.

  3. Copy your *.extensions file with the configuration of your extensions to the configuration/extensions directory.

  4. Restart Xpert.ivy Server.