|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectunbbayes.util.extension.manager.CorePluginNodeManager
public class CorePluginNodeManager
This class manages the plugin nodes (nodes loaded by plugins) for the UnBBayes' core module.
Field Summary | |
---|---|
static String |
PARAMETER_CLASS
Name of the extension point parameter for node's class IPluginNode or its builder PluginNodeBuilder |
static String |
PARAMETER_CURSOR
Name of the extension point parameter for a cursor displayed when a user selects this node at split button |
static String |
PARAMETER_DESCRIPTION
Name of the extension point parameter for this new node type's description (used as tool tip text) |
static String |
PARAMETER_ICON
Name of the extension point parameter for icons of the split button |
static String |
PARAMETER_NAME
Name of the extension point parameter for the name of this new node type (e.g. |
static String |
PARAMETER_PANEL_BUILDER
Name of the extension point parameter for a subclass/implementation of IProbabilityFunctionPanelBuilder @see IProbabilityFunctionPanelBuilder |
static String |
PARAMETER_SHAPE
Name of the extension point parameter for shape IPluginUShape or its builder IPluginUShapeBuilder |
Constructor Summary | |
---|---|
protected |
CorePluginNodeManager()
the default constructor is made protected in order to make it easy to extend |
Method Summary | |
---|---|
Collection<INodeClassDataTransferObject> |
getAllLoadedPluginNodes()
Calls reloadPlugin() and then returns
a set of all loaded plugin node's informations. |
protected String |
getMainExtensionPointID()
Gets the static value of pluginNodeExtensionPointID, which is the ID of PluginNode extension point. |
protected Map<Class,INodeClassDataTransferObject> |
getNodeClassToDtoMap()
this is a map to store the informations associated to classes extending IPluginNode (which are plugin nodes) |
INodeClassDataTransferObject |
getPluginNodeInformation(Class nodeClass)
Obtains a plugin node information registered by registerNodeClass(Class, INodeClassDataTransferObject) . |
UnBBayesPluginContextHolder |
getUnbbayesPluginContextHolder()
|
void |
loadPlugin()
This is equivalent to reloadPlugin() |
static CorePluginNodeManager |
newInstance()
Obtains a singleton instance of CorePluginNodeManager |
void |
registerNodeClass(Class nodeClass,
INodeClassDataTransferObject dto)
Associates a plugin node's class to its set of aditional information. |
void |
reloadPlugin()
UnBBayesPluginContextHolder will be used to load the plugin nodes
and fill the plugin informations that can be obtained by
getPluginNodeInformation(Class) . |
protected void |
setMainExtensionPointID(String pluginNodeID)
Sets the static value of pluginNodeExtensionPointID, which is the ID of PluginNode extension point. |
protected void |
setNodeClassToDtoMap(Map<Class,INodeClassDataTransferObject> nodeClassToDtoMap)
this is a map to store the informations associated to classes extending IPluginNode (which are plugin nodes) |
void |
setUnbbayesPluginContextHolder(UnBBayesPluginContextHolder unbbayesPluginContextHolder)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PARAMETER_CLASS
IPluginNode
or its builder PluginNodeBuilder
public static final String PARAMETER_SHAPE
IPluginUShape
or its builder IPluginUShapeBuilder
public static final String PARAMETER_NAME
public static final String PARAMETER_DESCRIPTION
public static final String PARAMETER_ICON
public static final String PARAMETER_CURSOR
public static final String PARAMETER_PANEL_BUILDER
IProbabilityFunctionPanelBuilder
@see IProbabilityFunctionPanelBuilder
Constructor Detail |
---|
protected CorePluginNodeManager()
Method Detail |
---|
public static CorePluginNodeManager newInstance()
protected Map<Class,INodeClassDataTransferObject> getNodeClassToDtoMap()
protected void setNodeClassToDtoMap(Map<Class,INodeClassDataTransferObject> nodeClassToDtoMap)
nodeClassToDtoMap
- the nodeClassToDtoMap to setpublic void registerNodeClass(Class nodeClass, INodeClassDataTransferObject dto)
getPluginNodeInformation(Class)
nodeClass
- dto
- getPluginNodeInformation(Class)
public INodeClassDataTransferObject getPluginNodeInformation(Class nodeClass)
registerNodeClass(Class, INodeClassDataTransferObject)
.
If not found, the plugins will be reloaded once and tried again.
nodeClass
-
public void reloadPlugin() throws IOException
UnBBayesPluginContextHolder
will be used to load the plugin nodes
and fill the plugin informations that can be obtained by
getPluginNodeInformation(Class)
.
IOException
- : when UnBBayesPluginContextHolder.publishPlugins()
failspublic void loadPlugin() throws IOException
reloadPlugin()
IOException
- : thrown by reloadPlugin()
reloadPlugin()
public Collection<INodeClassDataTransferObject> getAllLoadedPluginNodes()
reloadPlugin()
and then returns
a set of all loaded plugin node's informations.
protected String getMainExtensionPointID()
protected void setMainExtensionPointID(String pluginNodeID)
pluginNodeExtensionPointID
- the pluginNodeExtensionPointID to setpublic UnBBayesPluginContextHolder getUnbbayesPluginContextHolder()
public void setUnbbayesPluginContextHolder(UnBBayesPluginContextHolder unbbayesPluginContextHolder)
unbbayesPluginContextHolder
- the unbbayesPluginContextHolder to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |