Project

General

Profile

Add-on System » History » Version 1

Dirk Petrautzki, 08/05/2013 02:42 PM

1 1 Dirk Petrautzki
h1. Add-on System
2
3
This section describes the add-on system from the perspective of a developer.
4
The implementation of the add-on system is located in the maven module with the group Id *org.openecard* and the artifact Id *addon*.
5
All classes are in a sub namespace of *org.openecard.addon*. The module is divided into the following five packages:
6
* *org.openecard.addon*
7
In this package are the main classes of the add-on system, for example the AddonManager or the different AddonRegistries.
8
* *org.openecard.addon.bind*
9
This package includes all classes representing the interface between an addon and a specific binding. That is to say, here are the classes needed to convert a specific request, for example a HTTP request that arrives via the localhost binding, into a generic request, which is independent from binding and vice versa for the response.
10
* *org.openecard.addon.ifd*
11
In here are the classes that specify the interface for an IFD protocol and the factory to instantiate such a protocol.
12
* *org.openecard.addon.manifest*
13
This package accumulates all classes needed to convert (automatically) between the XML represantation of the add-on description and it's java object pendants.
14
* *org.openecard.addon.sal*
15
In here are the classes that specify the interface for an SAL protocol and the factory to instantiate such a protocol.
16
17
h1. Types of add-ons
18
*TODO*
19
20
h1. Add-on development
21
22
This section describes the steps to take when developing an add-on.
23
As first step a new XML file called *Addon.xml* in the *META-INF* directory of the project should be created and the fields that describe the general part of the add-ons can already be filled.
24
An example file for a PIN Management addon could look like this:
25
<pre>
26
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
27
<AddonBundleDescription>
28
	<ID>PIN-Plugin</ID>
29
	<Version>1.0</Version>
30
	<About />
31
	<License />
32
	<LocalizedName xml:lang="DE">PIN Verwaltung</LocalizedName>
33
	<LocalizedDescription xml:lang="DE">Verwaltung von PIN/ PUK und gegebenenfalls anderen Geheimnissen der Chipkarte.
34
	</LocalizedDescription>
35
	<LocalizedName xml:lang="EN">PIN Management</LocalizedName>
36
	<LocalizedDescription xml:lang="EN">Management of PIN/ PUK and possibly other secrets of the smart-card.</LocalizedDescription>
37
	<Logo>images/logo.png</Logo>
38
	<ConfigDescription />
39
	<BindingActions />
40
	<ApplicationActions />
41
	<IFDActions />
42
	<SALActions />
43
</AddonBundleDescription>
44
</pre>
45
As can be seen, some fields can be localized. That fields are: *LocalizedName*, *LocalizedDescription* and *About*
46
The next step is to think about what actions should be offerd by the add-on and of what type these actions are.
47
For the PIN management example there are two actions. An action to change a PIN and a second action to unblock a PIN.
48
These actions are not of type ProtocolPlugin nor AppPluginAction, but of type AppExtensionAction, as they expand the function of the "Open an e-card app" independent from a binding or protocol.
49
*TODO* ...