Child pages
  • Creating Client Plugins

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Custom Plugins are java classes contained in jar files from plugins folder that inherit IServerPlugin, ISmartClientPlugin or IClientPlugin. At startup, Servoy will search all jar files from plugins folder for its plugins. If MANIFEST.MF file of the jar contains attribute Servoy-Plugin: True together with class name Servoy will not scan all jar but just take those classes. For example, for mail plugin, the following code is needed in manifest file:

...

The plugin jar can use Java Service Provider to expose Servoy Plugin classes. There should be a file inside jar at path: META-INF/services/com.servoy.j2db.plugins.IPlugin which contains a line for each plugin that jar should expose (a class that implements IPlugin). The plugin should also have a default constructor (with no parameters). If file com.servoy.j2db.plugins.IPlugin is missing or contains invalid entries Servoy will scan the jar for all classes that implement interface IPlugin. An example of file content (for mail plugin) is:

Code Block
com.servoy.extensions.plugins.mail.MailServer
com.servoy.extensions.plugins.mail.client.MailPlugin