Package org.camunda.bpm.engine.cdi.impl
Class ProcessVariableMap
- java.lang.Object
-
- org.camunda.bpm.engine.cdi.impl.ProcessVariableMap
-
- All Implemented Interfaces:
java.util.Map<java.lang.String,java.lang.Object>
,VariableMap
public class ProcessVariableMap extends java.lang.Object
Allows to expose the process variables of the current business process as a java.util.MapThe map delegates changes to BusinessProcess.setVariable(String, Object)
andBusinessProcess.getVariable(String)
, so that they are not flushed prematurely.- Author:
- Daniel Meyer
-
-
Field Summary
Fields Modifier and Type Field Description protected BusinessProcess
businessProcess
-
Constructor Summary
Constructors Constructor Description ProcessVariableMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VariableContext
asVariableContext()
Interprets the variable map as variable contextvoid
clear()
boolean
containsKey(java.lang.Object key)
boolean
containsValue(java.lang.Object value)
java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>>
entrySet()
java.lang.Object
get(java.lang.Object key)
<T> T
getValue(java.lang.String name, java.lang.Class<T> type)
<T extends TypedValue>
TgetValueTyped(java.lang.String name)
protected java.lang.Object
getVariable(java.lang.String variableName)
protected <T extends TypedValue>
TgetVariableTyped(java.lang.String variableName)
boolean
isEmpty()
java.util.Set<java.lang.String>
keySet()
java.lang.Object
put(java.lang.String key, java.lang.Object value)
void
putAll(java.util.Map<? extends java.lang.String,? extends java.lang.Object> m)
VariableMap
putValue(java.lang.String name, java.lang.Object value)
VariableMap
putValueTyped(java.lang.String name, TypedValue value)
java.lang.Object
remove(java.lang.Object key)
protected void
setVariable(java.lang.String variableName, java.lang.Object value)
int
size()
java.util.Collection<java.lang.Object>
values()
-
-
-
Field Detail
-
businessProcess
@Inject protected BusinessProcess businessProcess
-
-
Method Detail
-
getVariable
protected java.lang.Object getVariable(java.lang.String variableName)
-
getVariableTyped
protected <T extends TypedValue> T getVariableTyped(java.lang.String variableName)
-
setVariable
protected void setVariable(java.lang.String variableName, java.lang.Object value)
-
get
public java.lang.Object get(java.lang.Object key)
- Specified by:
get
in interfacejava.util.Map<java.lang.String,java.lang.Object>
-
getValue
public <T> T getValue(java.lang.String name, java.lang.Class<T> type)
- Specified by:
getValue
in interfaceVariableMap
-
getValueTyped
public <T extends TypedValue> T getValueTyped(java.lang.String name)
- Specified by:
getValueTyped
in interfaceVariableMap
-
put
public java.lang.Object put(java.lang.String key, java.lang.Object value)
- Specified by:
put
in interfacejava.util.Map<java.lang.String,java.lang.Object>
-
putAll
public void putAll(java.util.Map<? extends java.lang.String,? extends java.lang.Object> m)
- Specified by:
putAll
in interfacejava.util.Map<java.lang.String,java.lang.Object>
-
putValue
public VariableMap putValue(java.lang.String name, java.lang.Object value)
- Specified by:
putValue
in interfaceVariableMap
-
putValueTyped
public VariableMap putValueTyped(java.lang.String name, TypedValue value)
- Specified by:
putValueTyped
in interfaceVariableMap
-
size
public int size()
- Specified by:
size
in interfacejava.util.Map<java.lang.String,java.lang.Object>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacejava.util.Map<java.lang.String,java.lang.Object>
-
containsKey
public boolean containsKey(java.lang.Object key)
- Specified by:
containsKey
in interfacejava.util.Map<java.lang.String,java.lang.Object>
-
containsValue
public boolean containsValue(java.lang.Object value)
- Specified by:
containsValue
in interfacejava.util.Map<java.lang.String,java.lang.Object>
-
remove
public java.lang.Object remove(java.lang.Object key)
- Specified by:
remove
in interfacejava.util.Map<java.lang.String,java.lang.Object>
-
clear
public void clear()
- Specified by:
clear
in interfacejava.util.Map<java.lang.String,java.lang.Object>
-
keySet
public java.util.Set<java.lang.String> keySet()
- Specified by:
keySet
in interfacejava.util.Map<java.lang.String,java.lang.Object>
-
values
public java.util.Collection<java.lang.Object> values()
- Specified by:
values
in interfacejava.util.Map<java.lang.String,java.lang.Object>
-
entrySet
public java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> entrySet()
- Specified by:
entrySet
in interfacejava.util.Map<java.lang.String,java.lang.Object>
-
asVariableContext
public VariableContext asVariableContext()
Description copied from interface:VariableMap
Interprets the variable map as variable context- Specified by:
asVariableContext
in interfaceVariableMap
- Returns:
- A VariableContext which is capable of resolving all variables in the map
-
-