public class DefaultModuleLifeCycleHandler extends java.lang.Object implements IModuleLifeCycleHandler
IModuleLifeCycleHandler
interface.
This default implementation may be inherited by the module developers in order to simplify the code writing of the mdac session.
Constructor and Description |
---|
DefaultModuleLifeCycleHandler(IModule module)
C'tor initializing the module.
|
Modifier and Type | Method and Description |
---|---|
void |
configurationChanged(java.lang.String pName,
java.lang.String oldValue,
java.lang.String newValue)
Called when a module parameter value has changed.
|
static boolean |
install(java.lang.String modelioPath,
java.lang.String installPath)
Accepts the installation by default.
|
boolean |
select()
Called when the mdac is selected, which corresponds to the user action
"Deploy a mdac...".
|
boolean |
start()
Called when the mdac is started.
|
void |
stop()
Called before the mdac is stopped.
|
void |
unselect()
Called when the mdac is deselected from the project.
|
void |
upgrade(Version oldVersion,
java.util.Map<java.lang.String,java.lang.String> oldParameters)
Called when the mdac is being upgraded from a previous version.
|
protected IModule module
public DefaultModuleLifeCycleHandler(IModule module)
module
- the module being constructed.public static boolean install(java.lang.String modelioPath, java.lang.String installPath) throws ModuleException
modelioPath
- the path of modelio applicationinstallPath
- the path where the module archive contents have been expanded.ModuleException
- when the installation failed.public boolean select() throws ModuleException
IModuleLifeCycleHandler
select
in interface IModuleLifeCycleHandler
ModuleException
- when an error occurs preventing the module from being
selected.public boolean start() throws ModuleException
IModuleLifeCycleHandler
start
in interface IModuleLifeCycleHandler
ModuleException
- when an error occurs preventing the module from starting.public void stop() throws ModuleException
IModuleLifeCycleHandler
stop
in interface IModuleLifeCycleHandler
ModuleException
- when an error occurs preventing the module from stopping.public void unselect() throws ModuleException
IModuleLifeCycleHandler
unselect
in interface IModuleLifeCycleHandler
ModuleException
- when an error occurs preventing the module from being
unselected.public void upgrade(Version oldVersion, java.util.Map<java.lang.String,java.lang.String> oldParameters) throws ModuleException
IModuleLifeCycleHandler
upgrade
in interface IModuleLifeCycleHandler
oldVersion
- The previous version of the MDAColdParameters
- The previous list of parameters (key, value)ModuleException
- when an error occurs preventing the module from being
upgraded.public void configurationChanged(java.lang.String pName, java.lang.String oldValue, java.lang.String newValue)
IModuleLifeCycleHandler
configurationChanged
in interface IModuleLifeCycleHandler
pName
- The name of the parameter whose value changed.oldValue
- The previous value of the parameter value. Can be null
.newValue
- The new value of the parameter value. Can be null
.