Package nz.org.riskscape.engine.plugin
Interface PluginDescriptor
public interface PluginDescriptor
Contains meta data and standard methods for integrating a plugin's code base in to RiskScape
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDependency
(PluginDescriptor dependencyDescriptor) Register aPluginDescriptor
that is a dependency of thisPluginDescriptor
(according to getPluginDependencies).The plugin ids this plugin depends uponA unique id for the plugin - ideally globally unique, but must be at least install-uniqueThe location on the filesystem where this plugin's resources are locatedboolean
-
Method Details
-
getPluginId
String getPluginId()A unique id for the plugin - ideally globally unique, but must be at least install-unique
-
getI18nClassLoader
ClassLoader getI18nClassLoader()- Returns:
- a class loader that can be used for loading i18n resource bundles
-
hasPluginDependencies
boolean hasPluginDependencies()- Returns:
- if this plugin depends on other plugins
-
getPluginDependencies
The plugin ids this plugin depends upon
-
newPluginInstance
Plugin newPluginInstance()- Returns:
- a newly constructed instance of this plugin
-
addDependency
Register a
PluginDescriptor
that is a dependency of thisPluginDescriptor
(according to getPluginDependencies).This needs to happen before a plugin instance can be created via newPluginInstance as its likely this method will set up class loading appropriately
-
getPluginClassName
String getPluginClassName()- Returns:
- the java class name of the thing that implements Plugin
-
getVersion
String getVersion()- Returns:
- a version string for this plugin
-
getSourcePath
Path getSourcePath()The location on the filesystem where this plugin's resources are located
-