Adding a plugin

A LSC plugin is defined a third party component that can be:

  • a source service
  • a destination service
  • a scripting language support
  • a sync options implementation

At this time, the only LSC plugin which is available is the NIS plugin because of the non Open Source library distributed by SUN/Oracle (binary license).

Service plugin

A service plugin includes :

  • a XSD extension to define the settings of the plugin service
  • the plugin service which should implement either IService for a source service or IWritableService for a destination service
  • and maybe a connection definition if it isn't already defined in LSC

Sample service plugin

Consider looking at the FooBarLscService sample as decribed below. This fake service has been designed as an extension of a SimpleJdbcDestinationService to describe an embeddable LSC :

  • Ordered List ItemFirst define the configuration extension format: sample xsd
  • Generate the corresponding source :
$JAVA_HOME/bin/xjc -p com.foo.bar.generated \
    -b lsc.episode src/main/resources/etc/foobar-lsc-1.0.xsd

You will find the lsc.episode file inside the misc subdirectory of LSC source package.

  • Load the configuration through the service constructor: FooBarLscService.java
  • Configure it through a pluginDestinationService node in lsc.xml
  • Copy the XSD to your etc subdirectory (required to check the XML structure)
  • Run it with flag -DLSC.PLUGINS.PACKAGEPATH=com.foo.bar.generated (so that JAXB parser could find the extended classes)