|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jbpm.module.exe.ModuleInstance org.jbpm.context.exe.ContextInstance
public class ContextInstance
maintains all the key-variable pairs for a process instance. You can obtain a ContextInstance from a processInstance from a process instance like this :
ProcessInstance processInstance = ...; ContextInstance contextInstance = processInstance.getContextInstance();More information on context and process variableInstances can be found in the userguide, section context
Field Summary | |
---|---|
protected java.util.Map |
tokenVariableMaps
|
protected java.util.Map |
transientVariables
|
protected java.util.List |
updatedVariableContainers
|
Fields inherited from class org.jbpm.module.exe.ModuleInstance |
---|
processInstance |
Constructor Summary | |
---|---|
ContextInstance()
|
Method Summary | |
---|---|
void |
addVariables(java.util.Map variables)
adds all the variableInstances on the root-token (= process-instance scope). |
void |
addVariables(java.util.Map variables,
Token token)
adds all the variableInstances to the scope of the given token. |
void |
createVariable(java.lang.String name,
java.lang.Object value)
creates a variable on the root-token (= process-instance scope) and calculates the actual VariableInstance-type from the value. |
void |
createVariable(java.lang.String name,
java.lang.Object value,
Token token)
creates a variable in the scope of the given token and calculates the actual VariableInstance-type from the value. |
void |
deleteTransientVariable(java.lang.String name)
removes the transient variable. |
void |
deleteVariable(java.lang.String name)
deletes the given variable on the root-token (=process-instance scope). |
void |
deleteVariable(java.lang.String name,
Token token)
deletes a variable from the given token. |
java.lang.Object |
getLocalVariable(java.lang.String name,
Token token)
retrieves a variable which is local to the token. |
TokenVariableMap |
getOrCreateTokenVariableMap(Token token)
searches for the first token-variable-map for the given token and creates it on the root token if it doesn't exist. |
TokenVariableMap |
getTokenVariableMap(Token token)
looks for the first token-variable-map that is found up the token-parent hirarchy. |
java.util.Map |
getTokenVariableMaps()
|
java.lang.Object |
getTransientVariable(java.lang.String name)
retrieves the transient variable for the given name. |
java.util.Map |
getTransientVariables()
retrieves all the transient variableInstances map. note that no deep copy is performed, changing the map leads to changes in the transient variableInstances of this context instance. |
java.lang.Object |
getVariable(java.lang.String name)
gets the variable with the given name on the root-token (= process-instance scope). |
java.lang.Object |
getVariable(java.lang.String name,
Token token)
retrieves a variable in the scope of the token. |
VariableInstance |
getVariableInstance(java.lang.String name,
Token token)
|
java.util.Map |
getVariables()
gets all the variableInstances on the root-token (= process-instance scope). |
java.util.Map |
getVariables(Token token)
retrieves all the variableInstances in scope of the given token. |
boolean |
hasTransientVariable(java.lang.String name)
tells if a transient variable with the given name is present. |
boolean |
hasVariable(java.lang.String name)
checks if a variable is present with the given name on the root-token (= process-instance scope). |
boolean |
hasVariable(java.lang.String name,
Token token)
checks if a variable is present with the given name in the scope of the token. |
void |
setTransientVariable(java.lang.String name,
java.lang.Object value)
sets the transient variable for the given name to the given value. |
void |
setTransientVariables(java.util.Map transientVariables)
replaces the transient variableInstances with the given map. |
void |
setVariable(java.lang.String name,
java.lang.Object value)
sets a variable on the process instance scope. |
void |
setVariable(java.lang.String name,
java.lang.Object value,
Token token)
sets a variable. |
Methods inherited from class org.jbpm.module.exe.ModuleInstance |
---|
equals, getId, getProcessInstance, getService, setProcessInstance |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Map tokenVariableMaps
protected transient java.util.Map transientVariables
protected transient java.util.List updatedVariableContainers
Constructor Detail |
---|
public ContextInstance()
Method Detail |
---|
public void createVariable(java.lang.String name, java.lang.Object value)
public void createVariable(java.lang.String name, java.lang.Object value, Token token)
public java.util.Map getVariables()
public java.util.Map getVariables(Token token)
public void addVariables(java.util.Map variables)
public void addVariables(java.util.Map variables, Token token)
public java.lang.Object getVariable(java.lang.String name)
public java.lang.Object getVariable(java.lang.String name, Token token)
public java.lang.Object getLocalVariable(java.lang.String name, Token token)
public void setVariable(java.lang.String name, java.lang.Object value)
public void setVariable(java.lang.String name, java.lang.Object value, Token token)
public boolean hasVariable(java.lang.String name)
public boolean hasVariable(java.lang.String name, Token token)
public void deleteVariable(java.lang.String name)
public void deleteVariable(java.lang.String name, Token token)
public java.lang.Object getTransientVariable(java.lang.String name)
public void setTransientVariable(java.lang.String name, java.lang.Object value)
public boolean hasTransientVariable(java.lang.String name)
public java.util.Map getTransientVariables()
public void setTransientVariables(java.util.Map transientVariables)
public void deleteTransientVariable(java.lang.String name)
public TokenVariableMap getOrCreateTokenVariableMap(Token token)
public TokenVariableMap getTokenVariableMap(Token token)
public VariableInstance getVariableInstance(java.lang.String name, Token token)
public java.util.Map getTokenVariableMaps()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |