Class Plugin

java.lang.Object
io.bdeploy.api.plugin.v1.Plugin

public abstract class Plugin extends Object
Base class for all plugins.

Plugins are registered on the server using a unique plugin ID. This ID is of no direct interest to the plugin. All endpoints and assets will be served by the server in a context path which reflects this ID. A plugin with an identical (i.e. hash of JAR identical) ID will be served only once, even if registered multiple times.

  • Field Details

    • PLUGIN_CLASS_HEADER

      public static final String PLUGIN_CLASS_HEADER
      The name of the MANIFEST.MF header which must be present in the JAR file of the plugin pointing to the fully qualified name of the Plugin subclass within the JAR.
      See Also:
    • PLUGIN_NAME_HEADER

      public static final String PLUGIN_NAME_HEADER
      The name of the MANIFEST.MF header which must be present in the JAR file of the plugin setting the human readable name of the plugin
      See Also:
    • PLUGIN_VERSION_HEADER

      public static final String PLUGIN_VERSION_HEADER
      The name of the MANIFEST.MF header which must be present in the JAR file of the plugin setting the human readable version of the plugin
      See Also:
    • PLUGIN_SORTER_HEADER

      public static final String PLUGIN_SORTER_HEADER
      A header which is used to discover plugins which allow product version sorting without actually loading those plugins.
      See Also:
  • Constructor Details

    • Plugin

      public Plugin()
  • Method Details

    • getComponentClasses

      public Collection<Class<?>> getComponentClasses()
      Returns:
      a collection of JAX-RS component classes which should be registered as resources.
    • getComponentObjects

      public Collection<Object> getComponentObjects()
      Returns:
      a collection of JAX-RS component objects which should be registered with the server.
    • getAssets

      public Collection<PluginAssets> getAssets()
      Returns:
      a collection of PluginAssets which describe the plugin's asset paths to be hosted on the server.
    • getCustomEditors

      public Collection<CustomEditor> getCustomEditors()
      Returns:
      a collection of CustomEditor which describe all custom editors which can be loaded from this plugin.
    • getCustomSorter

      public CustomProductVersionSorter getCustomSorter()
      Returns:
      a CustomProductVersionSorter which provides custom version comparision for the product.