Adds a new component to this experiment.
Currently only two Component Types are accepted:
SocietyComponent RecipeComponent Parameters: comp - exception: java.lang.IllegalArgumentException - if an error occurs
Adds the Given Host to the Experiment
If the given host already exists, an exception is thrown.
Parameters: name - - Name of the new Host a HostComponent for this host. exception: java.lang.IllegalArgumentException - if an error occurs
Adds a new node to this experiment. If the node
currently exists, an exception is thrown.
Parameters: name - - Name of new Node a NodeComponent value exception: java.lang.IllegalArgumentException - if an error occurs
An Experiment now has a configuration writer that
lets all the components write themselves out
createDefaultConfiguration
final public void createDefaultConfiguration()(Code)
Blindly assume the experiment has no hosts or nodes yet.
Create a host for the local host, a Node named Node0, and put
all the agents on that node on that host.
Get the Nodes in this Experiment.
As a side-effect, ensure that the NameServer Host property
is set correctly, and ensure that the Node/Agent mapping
is up-to-date.
If the experiment has at least one host with at least one node
with at least one agent, that is a configuration.
a boolean true if it has a configured agent
Imports a HNA XML file. The file is imported into
a ComponentData structure which is then
traversed and applied to the current experiment.
Parameters: parent - - Parent GUI Component
Return whether or not experiment is being edited.
Note that the experiment may be viewed (but not edited) in an editor,
even if this flag is not set.
boolean whether or not experiment is being edited
Return whether or not experiment is runnable. An experiment is runnable:
if it has a host-node-agent mapping, and
it has no unbound properties, and
it's not being edited or run, and
it's been saved in the database (i.e. the modified flag is false)
whether or not an experiment is runnable
Removes the given component from the Experiment.
If the component is not supported, an exception
is throw.
Parameters: comp - exception: java.lang.IllegalArgumentException - if an error occurs
Renames a host in the Experiment.
If a host with the given name already exists, an exception
is thrown.
Parameters: hostComponent - - HostComponent of the host to be renamed. Parameters: name - - New Host Name exception: java.lang.IllegalArgumentException - if an error occurs
Renames a currently existing Node in this Experiment.
If a node with the new name already exists, an exception is thrown
Parameters: nc - - Node Component of the Node to change name Parameters: name - - New Name exception: java.lang.IllegalArgumentException - if an error occurs
Indicate that the experiment is up-to-date with respect to the database.
Use with caution! The only reason to reset this flag
is that when an experiment is created from the database, its components
are built-up from the database information, and thus the experiment
appears to be modified.
final public void setEditInProgress(boolean newEditInProgress)(Code)
Set edit in progress. Used by UI tools to indicate that an
experiment is being edited. Note that this is distinct from
setting the editability flag, which indicates whether the experiment
can ever be edited.
Parameters: newEditInProgress -
setExperimentID
final public void setExperimentID(String expID)(Code)
Sets the Experiment ID for this Experiment.
Parameters: expID -
Adds an array of RecipeComponents to this
experiment.
Parameters: newRecipes - RecipeComponents
setResultDirectory
final public void setResultDirectory(File resultDirectory)(Code)
setRunInProgress
final public void setRunInProgress(boolean newRunInProgress)(Code)
Set run in progress. Used by UI tools to indicate that an
experiment is being run. Note that this is distinct from
setting the runnability flag, which indicates whether the experiment
can ever be run.
Parameters: newRunInProgress -
final public void updateNameServerHostName()(Code)
Insure that we have a valid nameserver specification. There are
several possibilities: If the default node nameserver argument
has been set, try to make that be the name server. Parse out the
host name part. Then scan all the hosts that have nodes
and check to see if any host matches that specified by the
default node nameserver argument. If it does, keep that
nameserver. If it doesn't (or if there was no default node
nameserver argument) then use the first host as the nameserver.