public class MockExecutionContext extends AbstractExecutionContext
ExecutionContext which should be
used for testing. By default it uses MockNamespace as a
Namespace implementation, but you can provide your own
Namespace which will be used.| Constructor and Description |
|---|
MockExecutionContext()
Creates new instance with a
MockNamespace as a Namespace
implementation, no parent context, 0L as the context id and no
ContextModelElement. |
MockExecutionContext(Namespace namespace)
Creates new instance with no parent context, 0L as the context id and no
ContextModelElement. |
MockExecutionContext(Namespace namespace,
ExecutionContext parentContext,
long contextId,
com.whitestein.lsps.model.ContextModelElement element)
Creates new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addExecutionTrace(ExecutionTrace et)
Adds ExecutionTrace to the context.
|
void |
addExecutionTraceElement(ExecutionTraceElement e)
Adds ExecutionTraceElement to the context.
|
void |
addSignal(java.lang.Object signal)
Adds a signal to the signal queue.
|
void |
flushAll()
Flush of all sessions (core, org, human,...
|
CompiledContext |
getCompiled()
Returns compiled context.
|
CompiledContext |
getCompiled(java.lang.String moduleName)
Returns compiled context of the module
|
ComponentService |
getComponentService()
Returns component service
|
long |
getContextId()
Returns the context id.
|
RuntimeToPersistentConverter |
getConverter()
Returns converter.
|
java.lang.String |
getEvaluationLevel()
Returns evaluation level.
|
ExecutionTrace |
getExecutionTrace() |
Handle |
getHandle(ValueHolder valueHolder)
Returns a serializable handle for the given value-holder.
|
com.whitestein.lsps.model.ContextModelElement |
getModelElement()
Returns the corresponding context model element.
|
ModelInstance |
getModelInstance()
Returns the model instance.
|
ModelProvider |
getModelProvider()
Returns model provider.
|
Namespace |
getNamespace()
Returns namespace associated with this context.
|
protected NamespaceModel |
getNamespaceModel()
Returns namespace model for this context.
|
ExecutionContext |
getParentContext()
Returns the parent execution context or null if it does not exist.
|
java.lang.String |
getPath()
Returns the full path to this context as a string.
|
QID |
getPathQID()
Returns the full path to this context as a QID.
|
ProcessInstance |
getProcessInstance()
Returns the process instance.
|
com.whitestein.lsps.model.ProcessModel |
getProcessModel()
Returns the process model.
|
java.lang.String |
getProcessPath()
Returns the full path to model element that is bound to this context.
|
QID |
getProcessPathQID()
Returns the full path to model element that is bound to this context.
|
ValueHolder |
getValueHolder(Handle handle)
Returns a value-holder for the given handle.
|
void |
setCompiled(CompiledContext compiledContext)
Sets compiled context.
|
void |
setModelInstance(ModelInstance modelInstance)
Sets the model instance.
|
void |
setProcessInstance(ProcessInstance processInstance)
Sets the process instance.
|
void |
setProcessModel(com.whitestein.lsps.model.ProcessModel processModel)
Sets the process model
|
getStackTrace, getStackTraceInfo, getVariableValue, getVariableValue, resolveVariableNamespace, resolveVariableNamespace, setVariableValue, setVariableValue, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetInLevelpublic MockExecutionContext()
MockNamespace as a Namespace
implementation, no parent context, 0L as the context id and no
ContextModelElement.public MockExecutionContext(Namespace namespace)
ContextModelElement.namespace - java.lang.NullPointerException - if namespace is nullpublic MockExecutionContext(Namespace namespace, ExecutionContext parentContext, long contextId, com.whitestein.lsps.model.ContextModelElement element)
namespace - parentContext - contextId - element - java.lang.NullPointerException - if namespace is nullpublic Namespace getNamespace()
ExecutionContextprotected NamespaceModel getNamespaceModel()
AbstractExecutionContextgetNamespaceModel in class AbstractExecutionContextpublic void addSignal(java.lang.Object signal)
ExecutionContextpublic com.whitestein.lsps.model.ContextModelElement getModelElement()
ExecutionContextpublic long getContextId()
ExecutionContextpublic ExecutionContext getParentContext()
ExecutionContextpublic Handle getHandle(ValueHolder valueHolder)
HandleResolverHandleResolver.getValueHolder(Handle).valueHolder - the value-holderpublic ValueHolder getValueHolder(Handle handle)
HandleResolverhandle - the handlepublic java.lang.String getPath()
ExecutionContextpublic QID getPathQID()
ExecutionContextpublic java.lang.String getProcessPath()
ExecutionContextpublic QID getProcessPathQID()
ExecutionContextpublic ModelInstance getModelInstance()
ExecutionContextpublic void setModelInstance(ModelInstance modelInstance)
modelInstance - the model instancepublic ProcessInstance getProcessInstance()
ExecutionContextpublic void setProcessInstance(ProcessInstance processInstance)
processInstance - the process instancepublic com.whitestein.lsps.model.ProcessModel getProcessModel()
ExecutionContextpublic void setProcessModel(com.whitestein.lsps.model.ProcessModel processModel)
processModel - the process modelpublic void flushAll()
ExecutionContextpublic java.lang.String getEvaluationLevel()
ExecutionContextpublic void addExecutionTraceElement(ExecutionTraceElement e)
TraceableExecutionExecutionTrace and
ExecutionTraceElement.e - ExecutionTraceElement to be added.public void addExecutionTrace(ExecutionTrace et)
TraceableExecutionExecutionTrace and
ExecutionTraceElement.et - ExecutionTrace to be added.public ExecutionTrace getExecutionTrace()
ExecutionTrace and
ExecutionTraceElement.public CompiledContext getCompiled()
ExecutionContextpublic void setCompiled(CompiledContext compiledContext)
ExecutionContextpublic CompiledContext getCompiled(java.lang.String moduleName)
ExecutionContextpublic ModelProvider getModelProvider()
ExecutionContextpublic ComponentService getComponentService()
ExecutionContextpublic RuntimeToPersistentConverter getConverter()
ExecutionContextCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.