java.lang.Object
de.iip_ecosphere.platform.support.plugins.Plugin<T>
Type Parameters:
T - the type of the implementing class
Direct Known Subclasses:
SingletonPlugin

public class Plugin<T> extends Object
Represents a plugin.
Author:
Holger Eichelberger, SSE
  • Field Details

  • Constructor Details

    • Plugin

      public Plugin(String id, List<String> ids, Class<T> instanceCls, Function<Plugin<T>,T> creator, File installDir)
      Creates a plugin instance.
      Parameters:
      id - the primary plugin id
      ids - further (optional) ids, may be empty or null
      instanceCls - the instance class
      creator - the creator supplier
      installDir - the installation directory, may be null
  • Method Details

    • getId

      public String getId()
      Returns the unique/primary plugin id. Shall comply with the corresponding PluginDescriptor.
      Returns:
      the id
    • getFurtherIds

      public List<String> getFurtherIds()
      Returns further ids. Shall comply with the corresponding PluginDescriptor.
      Returns:
      the further ids, may be null, empty, unmodifiable
    • getAllIds

      public List<String> getAllIds()
      Returns the primary and all secondary ids.
      Returns:
      the ids
    • getInstanceClass

      public Class<T> getInstanceClass()
      Returns the type of the implementing class.
      Returns:
      the implementing class type
    • getInstance

      public T getInstance()
      Returns the implementing class.
      Returns:
      the implementing class
    • cleanup

      public void cleanup()
      Cleans up this plugin.
    • getInstallDir

      public File getInstallDir()
      Returns the installation directory.
      Returns:
      the directory, may be null