This page (revision-90) was last changed on 24-Feb-2016 11:06 by Albrecht Striffler

This page was created on 20-Nov-2012 15:45 by UnknownAuthor

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
90 24-Feb-2016 11:06 9 KB Albrecht Striffler to previous
89 15-May-2014 09:33 9 KB Volker Belli to previous | to last
88 15-May-2014 09:32 9 KB Volker Belli to previous | to last
87 15-May-2014 09:30 9 KB Volker Belli to previous | to last
86 21-Jun-2013 15:09 8 KB Jochen Reutelshöfer to previous | to last
85 21-Jun-2013 15:08 8 KB Jochen Reutelshöfer to previous | to last
84 21-Dec-2012 16:15 7 KB Jochen Reutelshöfer to previous | to last
83 21-Dec-2012 16:14 7 KB Jochen Reutelshöfer to previous | to last
82 18-Dec-2012 17:47 7 KB Alex Legler to previous | to last Fix Image link URL
81 17-Dec-2012 21:33 7 KB CarstenWasner to previous | to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 8 added one line
!! Installation of Plugins
At line 10 added 35 lines
A simple and configurable code management is facilitated by plugins.
For a smooth connection between the main application and the plugins the directory path of a developed plugin need to be known by the main application.
The simplest possibility is the use of a designated directory.
For KnowWE the directory "WEB-INF\lib" is used. In this directory all libraries are stored. The plugins are recognized by their name, because each plugin contains "jpf-plugin" in it's artifact id.
A warning is logged in the case of a failed initialization.
A plugin is installed by simply copying it into the directory.
!! Management of Plugins
Their management is provided by the {{PluginManager}}, which is an abstract class that itself holds a singleton instance.
The singleton has to initialized by an inheriting class; an implementation is provided by the class {{JPFPluginManager}}, which is based on the [Java Plugin Frameworks|http://jpf.sourceforge.net] (JPF).
One of the static methods {{init(String dir)}} or {{init(File[] pluginFiles)}} initializes the {{PluginManager}}.
The passed parameter {{dir}} of the first method specifies the path of the directory including the plugins. The parameter of the second method directly contains the plugin files.
KnowWE uses the second method, because it filters the files from "WEB-INF/lib".
It is required to copy the developed plugin into the specified directory; this is described in more detail in [Build process].
!! Extension Points
A plugin consists of an XML file and a collection of class files (compiled source code).
The XML file specifies, which points in the source code are extended by the classes.
Also, new points in code can be defined that are extensible.
We call these points within the code {{ExtensionPoints}}, and we call the classes extending these points {{Extensions}}.
The structure of the XML file is described in more detail in [plugin.xml|Meaning of pluginxml].
For each {{ExtensionPoint}} there exists an interface, that have to be implemented by the class extending the {{ExtensionPoint}}.
Then, the {{PluginManager}} provides an array of instances, that define this {{ExtensionPoint}}.
The array is sorted according to the priority of the extensions.
The priority is defined in the XML file as well as the name and the description of the extension.
In addition, it is possible to define further attributes for an {{ExtensionPoint}}.
These attributes have to be included in the XML file of the implementing extensions.
<tags>plugin extension jpf </tags>