public class DefaultMdacSession extends Object implements IMdacSession
IMdacSession
interface.
This default implementation may be inherited by the mdac developers in order to simplify the code writing of the mdac session.
Modifier and Type | Field and Description |
---|---|
protected IMdac |
mdac
Module of the session.
|
Constructor and Description |
---|
DefaultMdacSession(IMdac module)
Creates a new session connected to a module.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
install(String modelioPath,
String installPath)
Accepts the installation by default.
|
boolean |
select()
Accepts the selection by default.
|
boolean |
start()
Accepts the start by default.
|
void |
stop()
Nothing is done by default when the module is stopping.
|
void |
unselect()
Nothing is done by default when the module is unselecting.
|
void |
upgrade(Version oldVersion,
Map<String,String> oldParameters)
The old parameter list is copied and pasted on the new module installation.
|
protected final IMdac mdac
public DefaultMdacSession(IMdac module)
module
- The module to connect.public static boolean install(String modelioPath, String installPath) throws MdacException
modelioPath
- the path of modelio applicationinstallPath
- the path where the module archive contents have been expanded.MdacException
- when the installation failed.public boolean select() throws MdacException
select
in interface IMdacSession
MdacException
public boolean start() throws MdacException
start
in interface IMdacSession
MdacException
public void stop() throws MdacException
stop
in interface IMdacSession
MdacException
public void unselect() throws MdacException
unselect
in interface IMdacSession
MdacException
public void upgrade(Version oldVersion, Map<String,String> oldParameters) throws MdacException
All the parameter keys that exist in the new version are automatically updated from the old parameters.
upgrade
in interface IMdacSession
oldVersion
- The previous version of the MDAColdParameters
- The previous list of parameters (key, value)MdacException