com.wrq.vhi.script.api
Interface ModelContext


public interface ModelContext

Provides information about the model and a model scoped shared storage.


Method Summary
 java.lang.String getModelName()
          Gets the name of the model which is used for this host session.
 java.lang.Object getModelStateObject(java.lang.String name)
          Gets the object bound to the specified name in this model context, or null if no object is bound to the name.
 java.lang.String getServerName()
          Gets the name of the server, as defined to AADS, which is executing this model.
 boolean isModelStateObject(java.lang.String name)
          Tests for the presence of a model context object bound to the specified name.
 void setModelStateObject(java.lang.String name, java.lang.Object object)
          Binds an object to this model context, using the name specified.
 

Method Detail

getServerName

java.lang.String getServerName()
Gets the name of the server, as defined to AADS, which is executing this model.

Returns:
name of server

getModelName

java.lang.String getModelName()
Gets the name of the model which is used for this host session.

Returns:
name of model

isModelStateObject

boolean isModelStateObject(java.lang.String name)
Tests for the presence of a model context object bound to the specified name.

Parameters:
name - the name of the object
Returns:
true if an object is bound to the specified name

getModelStateObject

java.lang.Object getModelStateObject(java.lang.String name)
Gets the object bound to the specified name in this model context, or null if no object is bound to the name.

Parameters:
name - the name of the object
Returns:
the object bound to the specified name or null if none

setModelStateObject

void setModelStateObject(java.lang.String name,
                         java.lang.Object object)
Binds an object to this model context, using the name specified. If an object of the same name is already bound to the model context, the object is replaced.

Parameters:
name - the name to which to bind the object
object - the object to bind