|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectunbbayes.util.extension.manager.UnBBayesPluginContextHolder
public class UnBBayesPluginContextHolder
This is a class that holds a virtually static (singleton) instance of plugin manager used by UnBBayes core. This class can be used to access plugin utility.
| Nested Class Summary | |
|---|---|
static interface |
UnBBayesPluginContextHolder.OnReloadActionListener
An interface to represent a listener, containing UnBBayesPluginContextHolder.OnReloadActionListener.onReload(EventObject)
which shall be called on every plugin reload events (e.g. |
| Constructor Summary | |
|---|---|
protected |
UnBBayesPluginContextHolder()
Default constructor is protected in order to help subclasses. |
| Method Summary | |
|---|---|
void |
addListener(UnBBayesPluginContextHolder.OnReloadActionListener listener)
Adds a new UnBBayesPluginContextHolder.OnReloadActionListener into this plugin holder. |
Map<String,Set<String>> |
getErroneousPluginIDDependencyMap()
This method obtains a map containing an erroneous plugin ID as a key, mapped to a set of plugin ID's of the dependencies causing its erroneous state. |
Map<String,Set<String>> |
getErroneousPluginIDDependencyMap(String extensionPointPluginID)
This method obtains a map containing an erroneous plugin ID as a key, mapped to a set of plugin ID's of the dependencies causing its erroneous state. |
Collection<String> |
getErroneousRequisiteID(org.java.plugin.registry.PluginDescriptor descr)
This method checks if a given plugin descriptor is a valid plugin. |
List<UnBBayesPluginContextHolder.OnReloadActionListener> |
getOnReloadListeners()
|
String |
getPluginCoreID()
The ID of the core plugin. |
org.java.plugin.PluginManager |
getPluginManager()
Return a singleton instance of plugin manager used by UnBBayes |
String |
getPluginsDirectoryName()
|
boolean |
isInitialized()
Tells us if the plugin infrastructure is already initialized (published). |
static UnBBayesPluginContextHolder |
newInstance()
Obtains a singleton instance of UnBBayesPluginContextHolder |
void |
notifyReload(Object origin)
Triggers every listeners at getOnReloadListeners(). |
void |
publishPlugins()
Loads plugins situated at getPluginsDirectoryName() folder
and publish them (make them usable). |
void |
setOnReloadListeners(List<UnBBayesPluginContextHolder.OnReloadActionListener> onReloadListeners)
|
void |
setPluginCoreID(String newPluginCoreID)
The ID of the core plugin. |
protected void |
setPluginManager(org.java.plugin.PluginManager pluginManager)
|
void |
setPluginsDirectoryName(String pluginsDirectoryName)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected UnBBayesPluginContextHolder()
| Method Detail |
|---|
public static UnBBayesPluginContextHolder newInstance()
UnBBayesPluginContextHolder
public org.java.plugin.PluginManager getPluginManager()
public void publishPlugins()
throws IOException
getPluginsDirectoryName() folder
and publish them (make them usable).
IOExceptionpublic String getPluginsDirectoryName()
public void setPluginsDirectoryName(String pluginsDirectoryName)
pluginsDirectoryName - the pluginsDirectoryName to setpublic String getPluginCoreID()
public void setPluginCoreID(String newPluginCoreID)
pluginCoreID - the pluginCoreID to setpublic boolean isInitialized()
publishPlugins() initializes the plugins.
public void notifyReload(Object origin)
getOnReloadListeners().
origin - : object that originated the notify event.public void addListener(UnBBayesPluginContextHolder.OnReloadActionListener listener)
UnBBayesPluginContextHolder.OnReloadActionListener into this plugin holder.
These listeners will be trigged by notifyReload(Object)
listener - notifyReload(Object)public List<UnBBayesPluginContextHolder.OnReloadActionListener> getOnReloadListeners()
public void setOnReloadListeners(List<UnBBayesPluginContextHolder.OnReloadActionListener> onReloadListeners)
onReloadListeners - the onReloadListeners to setprotected void setPluginManager(org.java.plugin.PluginManager pluginManager)
pluginManager - the pluginManager to setpublic Collection<String> getErroneousRequisiteID(org.java.plugin.registry.PluginDescriptor descr)
descr - : descriptor of the plugin to perform sanity check.
public Map<String,Set<String>> getErroneousPluginIDDependencyMap()
throws IOException
getPluginManager()'s methods to extract the plugin
descriptor from these IDs.
IOException - : when a I/O access or plugin publish cannot be done.
public Map<String,Set<String>> getErroneousPluginIDDependencyMap(String extensionPointPluginID)
throws IOException
getPluginManager()'s methods to extract the plugin
descriptor from these IDs.
extensionPointPluginID - : this is the plugin ID from where this method will look for
connected extension points. If null, the getPluginCoreID() will
be used. All extension points connected to this extensionPointPluginID will be checked
IOException - : when a I/O access or plugin publish cannot be done.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||