org.pentaho.reporting.libraries.base.boot

Interface Module

public interface Module extends ModuleInfo

A module encapsulates optional functionality within a project. Modules can be used as an easy way to make projects more configurable.

The module system provides a controled way to check dependencies and to initialize the modules in a controlled way.

Author: Thomas Morgner

Method Summary
voidconfigure(SubSystem subSystem)
Configures the module.
StringgetDescription()
Returns a short description of the modules functionality.
StringgetName()
Returns the module name.
ModuleInfo[]getOptionalModules()
Returns an array of optional modules.
StringgetProducer()
Returns the name of the module producer.
ModuleInfo[]getRequiredModules()
Returns an array of all required modules.
StringgetSubSystem()
Returns the modules subsystem.
voidinitialize(SubSystem subSystem)
Initializes the module.

Method Detail

configure

public void configure(SubSystem subSystem)
Configures the module. This should load the default settings of the module.

Parameters: subSystem the subSystem.

getDescription

public String getDescription()
Returns a short description of the modules functionality.

Returns: a module description.

getName

public String getName()
Returns the module name. This name should be a short descriptive handle of the module.

Returns: the module name

getOptionalModules

public ModuleInfo[] getOptionalModules()
Returns an array of optional modules. Missing or invalid modules are non fatal and will not harm the module itself.

Returns: an array of optional module specifications.

getProducer

public String getProducer()
Returns the name of the module producer.

Returns: the producer name

getRequiredModules

public ModuleInfo[] getRequiredModules()
Returns an array of all required modules. If one of these modules is missing or cannot be initialized, the module itself will be not available.

Returns: an array of the required modules.

getSubSystem

public String getSubSystem()
Returns the modules subsystem. If this module is not part of an subsystem then return the modules name, but never null.

Returns: the name of the subsystem.

initialize

public void initialize(SubSystem subSystem)
Initializes the module. Use this method to perform all initial setup operations. This method is called only once in a modules lifetime. If the initializing cannot be completed, throw a ModuleInitializeException to indicate the error,. The module will not be available to the system.

Parameters: subSystem the subSystem.

Throws: ModuleInitializeException if an error ocurred while initializing the module.