General

Download

Overview
Project History
People

Use Cases Scenarios
Use Case Requirements
Bugs and Known Limitations
LHA

User Manuals Getting Started
General Tour
Configuration Options
Logging Tool Tour
Administration Tool Tour

Developers Architecture
Analysis of Design
Creating Plugins
Future Enhancements

Creating Plugins

This section is aimed at developers who want to build their own plugins for CST. The procedure has the following steps:
  1. create a Java class which implements the interface GeneralPurposePluginAPI or SubjectInformationServiceAPI.
  2. create a *.jar file for your plugins and place it in the ./lib/plugins directory.
  3. Modify the configuration file to specify your plugins.

The best way to see how plugins work is to move the file ./doc/sample_files/SampleDataModelWithPlugins.xml to the models directory at ./models. When you run the Logging Tool, you will be able to see the plugins advertised in the menu bar. Figure Create-Plugins-1 shows the three types of plugins which are supported:

Create your Plugin

The following snapshot shows you what the code skeleton for a plugin might look like:

When you finish writing your plugin, create a JAR file for it and place that file in ./lib/plugins.

Alter the Configuration File

Use ./doc/sample_files/SampleDataModelWithPlugins.xml as an example. You can specify the configuration as in the following snapshots. Note that if you do not specify a tag for class_name, then CST creates a stub plugin which simply shows users the information you filled in for the other plugin configuration tags.

Figure Configuration-Example-1: Configuration for an import or export plugin.

Figure Configuration-Example-2: Configuration for a stubbed plugin.

Figure Configuration-Example-3: Configuration for a subject information service plugin.

Figure Configuration-Example-4: Configuration for a report plugin.

Author: Kevin Garwood


(c)2010 Medical Research Council. Licensed under Apache 2.0.