How to implement new extensions


When you want to create new extension then follow these steps:

1) locate OpenHub extensions project

See Development info for more details.

2) create new module

  • create new Maven module for new extension (pom.xml, README.txt)
  • create new packages which start by org.openhubframework.openhub.extension.[extension name]

3) create extension configuration

Each extension must have Spring XML configuration file that completelly initializes specific extension.

  • /META-INF/sp_ext_[ext_name].xml - this configuration most often loads property files and initializes routes.
  • ext_[ext_name].cfg - file with configuration parameters

Each extension is initialized in independent Spring context, see Dynamic extension loading for more details.

4) implement routes

Use parent class org.openhubframework.openhub.api.route.AbstractExtRoute for imlementation of extension routes.

If there are specific error codes then implement ErrorExtEnum with your codes.

Enumeration of external systems (ExternalSystemExtEnum) or enumeration of services (ServiceExtensionEnum) is in common module of OpenHub framework extension project. 

Each extension can have own XSD/WSDL resources for converting to Java - use jaxb_global_bindings.xjb file from common module. 

5) unit tests and wiki

Don't forget to implement unit tests and write comprehensive info about extension to wiki. Add new page under OpenHub framework extensions page.