Interface IPlugger

All Known Implementing Classes:
DefaultPlugger

public interface IPlugger
This class represents a plugger. A plugger is the interface between the kernel of the application and the plugins. The main method of the plugger is getExensionPoint(String) which return an extension point that can be accessed by the plugins. The extension keys can be obtained by the method getExtensionPointKeys().

A class implementing the interface IPlugin can also implements the IPlugger interface. So a plugin can also be a plugger and can be extended by others plugins.
Since:
1.0.0
Version:
"1.0.14" - b202111241200L
Author:
Julien SEINTURIER - Université de Toulon / CNRS LIS umr 7020 - github.com/jorigin/jcommon (contact@jorigin.org)
  • Method Details

    • getExensionPoint

      Object getExensionPoint(String key)
      Return the extension point referenced by the given key. If the key does not patch a plugin, null is returned.
      Parameters:
      key - the key of the extension point.
      Returns:
      the extension point.
    • getExtensionPointKeys

      String[] getExtensionPointKeys()
      Return all the keys identifying extension points.
      Returns:
      an array of String representing the key referencing extension points.
    • addExtensionPoint

      boolean addExtensionPoint(String key, Object extensionPoint)
      Add a new extension point to the plugger. The extension point is assigned to the key given. If the key is already affected to another extension point, the new extension point is not added.
      Parameters:
      key - the key of the extension point to add
      extensionPoint - the extension point to add
      Returns:
      true if the extension point is added, false otherwise