public final class PackageManager
extends java.lang.Object
Modules provide a simple capability to remove unneeded functionality from the JFreeReport system and to reduce the overall code size. The modularisation provides a very strict way of removing unnecessary dependencies beween the various packages.
The package manager can be used to add new modules to the system or to check the existence and state of installed modules.
Modifier and Type | Method and Description |
---|---|
void |
addModule(java.lang.String modClass)
Adds a module to the package manager.
|
Module[] |
getActiveModules()
Returns all active modules.
|
Module[] |
getAllModules()
Returns an array of the currently active modules.
|
static PackageManager |
getInstance()
Returns the singleton instance of the package manager.
|
PackageConfiguration |
getPackageConfiguration()
Returns the default package configuration.
|
void |
initializeModules()
Initializes all previously uninitialized modules.
|
boolean |
isModuleAvailable(ModuleInfo moduleDescription)
Checks, whether a certain module is available.
|
void |
load(java.lang.String modulePrefix)
Loads all modules mentioned in the report configuration starting with
the given prefix.
|
public static PackageManager getInstance() throws ConfigException
ConfigException
public boolean isModuleAvailable(ModuleInfo moduleDescription)
moduleDescription
- the module description of the desired module.public void load(java.lang.String modulePrefix) throws ConfigException
modulePrefix
- the module prefix.ConfigException
public void initializeModules()
public void addModule(java.lang.String modClass)
modClass
- the module classpublic PackageConfiguration getPackageConfiguration()
public Module[] getAllModules()
public Module[] getActiveModules()