Package org.jorigin.plugin
Interface IPlugger
-
- All Known Implementing Classes:
DefaultPlugger
public interface IPluggerThis class represents a plugger. A plugger is the interface between the kernel of the application and the plugins. The main method of the plugger isgetExensionPoint(String)which return an extension point that can be accessed by the plugins. The extension keys can be obtained by the methodgetExtensionPointKeys().
A class implementing the interfaceIPlugincan also implements theIPluggerinterface. So a plugin can also be a plugger and can be extended by others plugins.- Since:
- 1.0.0
- Version:
- "1.0.9" - b201903071030L
- Author:
- Julien Seinturier - COMEX S.A. - contact@jorigin.org - https://github.com/jorigin/jeometry
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanaddExtensionPoint(java.lang.String key, java.lang.Object extensionPoint)Add a new extension point to the plugger.java.lang.ObjectgetExensionPoint(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,nullis 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 addextensionPoint- the extension point to add- Returns:
- true if the extension point is added, false otherwise
-
-