public interface Module
| Modifier and Type | Method and Description |
|---|---|
Category[] |
getCategories()
Returns the categories the module belongs to.
|
java.lang.String |
getLongDescription()
Returns a long description of the module.
|
java.lang.String |
getName()
Returns the name of the module.
|
java.lang.String |
getShortDescription()
Returns a short description of the module.
|
java.lang.String |
getTitle()
Returns the title of the module.
|
void |
provide(ModuleOutputSpec outputSpec)
Specify the return values of the module.
|
void |
require(ModuleInputSpec inputSpec)
Specify the parameters of the module.
|
void |
run(ModuleInput input,
ModuleOutput output)
Perform some computation on the values stored in the
ModuleInput
object and store the results in the ModuleOutput object. |
java.lang.String getName()
void require(ModuleInputSpec inputSpec)
ModuleInputSpec.addParameter(String, Class, String, String...) method can
be used. The order of specified parameters matters.inputSpec - specification of parameters (input values)void provide(ModuleOutputSpec outputSpec)
ModuleOutputSpec.addReturnValue(String, Class, String...) method
can be used. The order of specified return values matters.outputSpec - specification of return values (output values)void run(ModuleInput input, ModuleOutput output) throws ModuleException
ModuleInput
object and store the results in the ModuleOutput object.
To retrieve values from ModuleInput object the
ModuleInput.getParameter(String, Class) method can be used.
To store values in the ModuleOutput object the
ModuleOutput.setReturnValue(String, Class, Object) method can be
used.
The possible values in both the ModuleInput and
ModuleOutput object are determined entirely by the specifications
in the require(ModuleInputSpec) and
provide(ModuleOutputSpec) method respectively.input - storage of the inputsoutput - storage of the outputsModuleException - On various kinds of errors that prevent the module from working.java.lang.String getTitle()
AbstractModule returns getName().java.lang.String getShortDescription()
AbstractModule returns an empty string.java.lang.String getLongDescription()
AbstractModule returns getShortDescription().Category[] getCategories()