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
    Author:
    Julien Seinturier - (c) 2009 - JOrigin project - http:/www.jorigin.org
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean addExtensionPoint​(java.lang.String key, java.lang.Object extensionPoint)
      Add a new extension point to the plugger.
      java.lang.Object getExensionPoint​(java.lang.String key)
      Return the extension point referenced by the given key.
      java.lang.String[] getExtensionPointKeys()
      Return all the keys identifying extension points.
    • Method Detail

      • getExensionPoint

        java.lang.Object getExensionPoint​(java.lang.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

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

        boolean addExtensionPoint​(java.lang.String key,
                                  java.lang.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