 | The following developers guide will help you learn how to create a new plugin for Apatar and develop your own connector or operation. |
Extension
To add a new node, such as connector or operation, to the Apatar application,
- You need to create your own plugin and place it in the "./plugins/connectors" folder. The "plugin.xml" file with a description of the new plugin should be put to the root of this folder. All plugins are extended from the com.apatar.core and com.apatar.ui classes.
<requires>
<import plugin-id="com.apatar.core" match="compatible" exported="false" optional="false" />
<import plugin-id="com.apatar.ui" match="compatible" exported="false" optional="false" />
</requires>
- Every node is created with the class that implements the NodeFactory interface. To make it visible for the application, this class should be specified in the "plugin.xml" file the following way:
<extension plugin-id="com.apatar.core" point-id="Node" id="Your_id_Here">
<parameter id="class" value="Your_Class_Here" />
</extension>
For instance,
<extension plugin-id="com.apatar.core" point-id="Node" id="MsSqlNode">
<parameter id="class" value="com.apatar.mssql.MsSqlNodeFactory" />
</extension>
Existing Classes
There are a number of created classes to ease the process of developing a new node.
- To create a general connector, you need to extend from the AbstractDataBase class.
- To create a JDBC-based connector, extend from the AbstractJdbcDataBase class.
- To create an operation node, extend from the DataTransNode class.
- To create a transparent operation node that has the same output fields as at the input, extend from the TransparentNode class.
- To save or retrieve the node's parameters, implement the public Element saveToElement() or initFromElement(Element e) methods.
- All actions that can be performed with the node, should be implemented in the Transform() method.
- To transer data from the real database to Apatar's internal one, implement the TransformRDBToTDB() method. To load data to the real database, implement the TransformTDBToRDB() method.
SVN Repository
For Apatar's source code, please browse http://apatar.com/download.html
See Also
How to Create New Apatar Function