|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pentaho.reporting.libraries.base.boot.DefaultModuleInfo
org.pentaho.reporting.libraries.base.boot.AbstractModule
public abstract class AbstractModule
The abstract module provides a default implementation of the module interface.
The module can be specified in an external property file. The file name of this specification defaults to "module.properties". The first and mandatory section is always the module info and contains the basic module properties like name, version and a short description.module.name: xls-export-gui module.producer: The JFreeReport project - www.jfree.org/jfreereport module.description: A dialog component for the Excel table export. module.version.major: 0 module.version.minor: 84 module.version.patchlevel: 0The properties name, producer and description are simple strings. They may span multiple lines, but may not contain a colon (':'). The version properties are integer values. This section may be followed by one or more "depends" sections. These sections describe the base modules that are required to be active to make this module work. The package manager will enforce this policy and will deactivate this module if one of the base modules is missing.
dependency.module-id.module: org.pentaho.reporting.engine.classic.core.modules.output.table.xls.XLSTableModule dependency.module-id.version.major: 0 dependency.module-id.version.minor: 84The property *.module references to the module implementation of the module package. The module-id is a per-module-definition-unique identifier and it is recommended to set it to the referenced module's name for documentary purposes.
Constructor Summary | |
---|---|
protected |
AbstractModule()
Default Constructor. |
Method Summary | |
---|---|
void |
configure(SubSystem subSystem)
Configures the module by loading the configuration properties and adding them to the package configuration. |
java.lang.String |
getDescription()
Returns the module description. |
java.lang.String |
getName()
Returns the name of this module. |
ModuleInfo[] |
getOptionalModules()
Returns a copy of the required modules array. |
java.lang.String |
getProducer()
Returns the producer of the module. |
ModuleInfo[] |
getRequiredModules()
Returns a copy of the required modules array. |
java.lang.String |
getSubSystem()
Returns the modules subsystem. |
protected static boolean |
isClassLoadable(java.lang.String name,
java.lang.Class context)
Tries to load a class to indirectly check for the existence of a certain library. |
protected void |
loadModuleInfo()
Loads the default module description from the file "module.properties". |
protected void |
loadModuleInfo(java.io.InputStream in)
Loads the module descriptiong from the given input stream. |
protected void |
performExternalInitialize(java.lang.String classname)
Deprecated. Use the method that provides a class-context instead. |
protected void |
performExternalInitialize(java.lang.String classname,
java.lang.Class context)
Executes an weakly referenced external initializer. |
protected void |
setDescription(java.lang.String description)
Defines the description of the module. |
protected void |
setName(java.lang.String name)
Defines the name of the module. |
void |
setOptionalModules(ModuleInfo[] optionalModules)
Defines the optional module descriptions for this module. |
protected void |
setProducer(java.lang.String producer)
Defines the producer of the module. |
protected void |
setRequiredModules(ModuleInfo[] requiredModules)
Defines the required module descriptions for this module. |
protected void |
setSubSystem(java.lang.String name)
Defines the subsystem name for this module. |
java.lang.String |
toString()
Returns a string representation of this module. |
Methods inherited from class org.pentaho.reporting.libraries.base.boot.DefaultModuleInfo |
---|
equals, getMajorVersion, getMinorVersion, getModuleClass, getPatchLevel, hashCode, setMajorVersion, setMinorVersion, setModuleClass, setPatchLevel |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.pentaho.reporting.libraries.base.boot.Module |
---|
initialize |
Methods inherited from interface org.pentaho.reporting.libraries.base.boot.ModuleInfo |
---|
getMajorVersion, getMinorVersion, getModuleClass, getPatchLevel |
Constructor Detail |
---|
protected AbstractModule()
Method Detail |
---|
protected void loadModuleInfo() throws ModuleInitializeException
ModuleInitializeException
- if an error occurs.protected void loadModuleInfo(java.io.InputStream in) throws ModuleInitializeException
in
- the input stream from where to read the file
ModuleInitializeException
- if an error occurs.public java.lang.String getName()
getName
in interface Module
Module.getName()
protected void setName(java.lang.String name)
name
- the module name.public java.lang.String getDescription()
getDescription
in interface Module
Module.getDescription()
protected void setDescription(java.lang.String description)
description
- the module's desciption.public java.lang.String getProducer()
getProducer
in interface Module
Module.getProducer()
protected void setProducer(java.lang.String producer)
producer
- the producer.public ModuleInfo[] getRequiredModules()
getRequiredModules
in interface Module
Module.getRequiredModules()
public ModuleInfo[] getOptionalModules()
getOptionalModules
in interface Module
Module.getRequiredModules()
protected void setRequiredModules(ModuleInfo[] requiredModules)
requiredModules
- the required modules.public void setOptionalModules(ModuleInfo[] optionalModules)
optionalModules
- the optional modules.public java.lang.String toString()
toString
in class DefaultModuleInfo
Object.toString()
protected static boolean isClassLoadable(java.lang.String name, java.lang.Class context)
name
- the name of the library class.context
- the context class to get a classloader from.
public void configure(SubSystem subSystem)
configure
in interface Module
subSystem
- the subsystem.protected void performExternalInitialize(java.lang.String classname) throws ModuleInitializeException
classname
- the class name of the initializer.
ModuleInitializeException
- if an error occuresprotected void performExternalInitialize(java.lang.String classname, java.lang.Class context) throws ModuleInitializeException
classname
- the classname of the ModuleInitializer
implementationcontext
- the class-loader context from where to load the module's classes.
ModuleInitializeException
- if an error occured or the initializer could not be found.public java.lang.String getSubSystem()
getSubSystem
in interface Module
protected void setSubSystem(java.lang.String name)
name
- the new name of the subsystem.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |