public class ExampleSetupXAffectDesktop extends Setup
Constructor and Description |
---|
ExampleSetupXAffectDesktop() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
checkParameters(java.util.HashMap<java.lang.String,java.lang.String> parameter)
Gives the possibility to validate the parameters requested by
Setup.getKeys() . |
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 . |
void |
instantiateComponents(LifeCycleManager manager,
java.util.HashMap<java.lang.String,java.lang.String> parameter)
Instantiates and configures
SystemComponent s. |
public void instantiateComponents(LifeCycleManager manager, java.util.HashMap<java.lang.String,java.lang.String> parameter) throws java.lang.Exception
Setup
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.instantiateComponents
in class Setup
parameter
- HashMap
with key-value-pairs for all required
parameters for the initialization of the setup.java.lang.Exception
public java.lang.String[] getKeys()
Setup
Setup
. HashMap
given in Setup.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.getKeys
in class Setup
Setup.instantiateComponents(LifeCycleManager, HashMap)
public java.lang.String checkParameters(java.util.HashMap<java.lang.String,java.lang.String> parameter)
Setup
Setup.getKeys()
. The given HashMap
will be the same as the
parameters given to Setup.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.checkParameters
in class Setup
parameter
- HashMap
containing pairs of parameters and values to
validate.Setup.instantiateComponents(LifeCycleManager, HashMap)
,
Setup.getKeys()