freemind.extensions
Interface HookFactory

All Known Implementing Classes:
BrowseHookFactory, HookFactoryAdapter, MindMapHookFactory

public interface HookFactory


Nested Class Summary
static class HookFactory.RegistrationContainer
           
 
Method Summary
 ModeControllerHook createModeControllerHook(java.lang.String hookName)
           
 NodeHook createNodeHook(java.lang.String hookName)
          Do not call this method directly.
 void deregisterAllRegistrationContainer()
           
 PermanentNodeHook getHookInNode(MindMapNode node, java.lang.String hookName)
           
 java.util.List getHookMenuPositions(java.lang.String hookName)
           
 HookInstanciationMethod getInstanciationMethod(java.lang.String hookName)
           
 java.lang.Object getPluginBaseClass(java.lang.String hookName)
          A plugin base class is a common registration class of multiple plugins.
 java.util.Vector getPossibleModeControllerHooks()
           
 java.util.Vector getPossibleNodeHooks()
           
 java.util.List getRegistrations()
          Each Plugin can have a list of HookRegistrations that are called after the corresponding mode is enabled.
 void registerRegistrationContainer(HookFactory.RegistrationContainer container, HookRegistration instanciatedRegistrationObject)
          See getRegistrations.
 

Method Detail

getPossibleNodeHooks

java.util.Vector getPossibleNodeHooks()
Returns:
a string vector with representatives for plugins.

getPossibleModeControllerHooks

java.util.Vector getPossibleModeControllerHooks()
Returns:
a string vector with representatives for plugins.

createModeControllerHook

ModeControllerHook createModeControllerHook(java.lang.String hookName)

createNodeHook

NodeHook createNodeHook(java.lang.String hookName)
Do not call this method directly. Call ModeController.createNodeHook instead.


getHookInNode

PermanentNodeHook getHookInNode(MindMapNode node,
                                java.lang.String hookName)
Returns:
null if not present, the hook otherwise.

getHookMenuPositions

java.util.List getHookMenuPositions(java.lang.String hookName)
Returns:
returns a list of menu position strings for the StructuredMenuHolder.

getInstanciationMethod

HookInstanciationMethod getInstanciationMethod(java.lang.String hookName)

getRegistrations

java.util.List getRegistrations()
Each Plugin can have a list of HookRegistrations that are called after the corresponding mode is enabled. (Like singletons.) One of these can operate as the pluginBase that is accessible to every normal plugin_action via the getPluginBaseClass method.

Returns:
A list of RegistrationContainer elements. The field hookRegistrationClass of RegistrationContainer is a class that is (probably) of HookRegistration type. You have to register every registration via the registerRegistrationContainer method when instanciated (this is typically done in the ModeController).

registerRegistrationContainer

void registerRegistrationContainer(HookFactory.RegistrationContainer container,
                                   HookRegistration instanciatedRegistrationObject)
See getRegistrations. The registration makes sense for the factory, as the factory observes every object creation.
Moreover, the factory can tell other hooks it creates, who is its base plugin.


deregisterAllRegistrationContainer

void deregisterAllRegistrationContainer()

getPluginBaseClass

java.lang.Object getPluginBaseClass(java.lang.String hookName)
A plugin base class is a common registration class of multiple plugins. It is useful to embrace several related plugins (example: EncryptedNote -> Registration).

Returns:
the base class if declared and successfully instanciated or NULL.