net.sf.genuine.organizer.internal
Class DefaultModuleManager

java.lang.Object
  extended bynet.sf.genuine.organizer.internal.DefaultModuleManager
All Implemented Interfaces:
InternalModuleManager, ModuleManager

public class DefaultModuleManager
extends java.lang.Object
implements InternalModuleManager

Default implementation of Genuine's module manager. It is responsible to create and initialize the modules and to provide services for modules.

Author:
Tim Wellhausen

Constructor Summary
DefaultModuleManager()
          Initializes all components
 
Method Summary
 javax.swing.JMenuBar buildMenuBar()
          Delegates to menu bar builder
 javax.swing.JToolBar buildToolBar()
          Delegates to tool bar builder
 GenuineAction getAction(java.lang.String identifier)
          Returns the first action instance in any module with the given name.
 ComponentManager getComponentManager()
          Returns a reference to the component manager instance.
 HelperService getHelperService()
          Returns a reference to the helper service instance.
 MessageBus getMessageBus()
          Returns a reference to the message bus instance.
 ServiceBroker getServiceBroker()
          Returns a reference to the service broker instance.
 void initializeModules(org.jdom.Element modulesElement, ProgressTracker progressTracker)
          Creates and initializes the modules.
 void postInitialize()
          The modules may perform late initialization operations.
 void setDesktopComponents(javax.swing.JFrame mainFrame, javax.swing.JDesktopPane desktopPane, javax.swing.JLabel infoLabel)
          Component manager and helper service need reference to desktop pane.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultModuleManager

public DefaultModuleManager()
Initializes all components

Method Detail

setDesktopComponents

public void setDesktopComponents(javax.swing.JFrame mainFrame,
                                 javax.swing.JDesktopPane desktopPane,
                                 javax.swing.JLabel infoLabel)
Component manager and helper service need reference to desktop pane.

Specified by:
setDesktopComponents in interface InternalModuleManager

initializeModules

public void initializeModules(org.jdom.Element modulesElement,
                              ProgressTracker progressTracker)
                       throws ConfigurationException
Creates and initializes the modules.

Specified by:
initializeModules in interface InternalModuleManager
Throws:
ConfigurationException

buildMenuBar

public javax.swing.JMenuBar buildMenuBar()
                                  throws ConfigurationException
Delegates to menu bar builder

Specified by:
buildMenuBar in interface InternalModuleManager
Throws:
ConfigurationException

buildToolBar

public javax.swing.JToolBar buildToolBar()
                                  throws ConfigurationException
Delegates to tool bar builder

Specified by:
buildToolBar in interface InternalModuleManager
Throws:
ConfigurationException

postInitialize

public void postInitialize()
                    throws ConfigurationException
The modules may perform late initialization operations.

Specified by:
postInitialize in interface InternalModuleManager
Throws:
ConfigurationException

getComponentManager

public ComponentManager getComponentManager()
Returns a reference to the component manager instance.

Specified by:
getComponentManager in interface ModuleManager

getServiceBroker

public ServiceBroker getServiceBroker()
Returns a reference to the service broker instance.

Specified by:
getServiceBroker in interface ModuleManager

getMessageBus

public MessageBus getMessageBus()
Returns a reference to the message bus instance.

Specified by:
getMessageBus in interface ModuleManager

getHelperService

public HelperService getHelperService()
Returns a reference to the helper service instance.

Specified by:
getHelperService in interface ModuleManager

getAction

public GenuineAction getAction(java.lang.String identifier)
Returns the first action instance in any module with the given name.

Specified by:
getAction in interface ModuleManager