public abstract class Setup
extends java.lang.Object
Constructor and Description |
---|
Setup() |
Modifier and Type | Method and Description |
---|---|
abstract java.lang.String |
checkParameters(java.util.HashMap<java.lang.String,java.lang.String> parameter)
Gives the possibility to validate the parameters requested by
getKeys() . |
abstract java.lang.String[] |
getKeys()
Returns an array of all parameter names (the keys from the
key-value-pairs) that are necessary for the initialization of this
Setup . |
abstract void |
instantiateComponents(LifeCycleManager manager,
java.util.HashMap<java.lang.String,java.lang.String> parameter)
Instantiates and configures
SystemComponent s. |
public abstract void instantiateComponents(LifeCycleManager manager, java.util.HashMap<java.lang.String,java.lang.String> parameter) throws java.lang.Exception
SystemComponent
s.HashMap
s for every
SystemComponent
to be added to the system.SystemComponent
s. The components will add
themselves to xAffect's component-pool automatically.parameter
- HashMap
with key-value-pairs for all required
parameters for the initialization of the setup.{@link
- Exception} containing an error-message, if anything went
wrong during the initialization.java.lang.Exception
public abstract java.lang.String[] getKeys()
Setup
. HashMap
given in instantiateComponents(LifeCycleManager, HashMap)
will
contain all of the parameters requested by the returning array of this
function and their values. The parameter's values will be filled in by
xAffect's Control
in a way defined by the Control itself.instantiateComponents(LifeCycleManager, HashMap)
public abstract java.lang.String checkParameters(java.util.HashMap<java.lang.String,java.lang.String> parameter)
getKeys()
. The given HashMap
will be the same as the
parameters given to instantiateComponents(LifeCycleManager, HashMap)
. If the
validation fails, this method is supposed to return an error-message
defining the faulty parameter in form of a String. The message will be
delegated to the Control
, which afterwards has to try and fill in
the requested parameters correctly.parameter
- HashMap
containing pairs of parameters and values to
validate.instantiateComponents(LifeCycleManager, HashMap)
,
getKeys()