Package org.camunda.bpm.engine.cdi.impl
Class ProcessVariableLocalMap
- java.lang.Object
-
- org.camunda.bpm.engine.cdi.impl.ProcessVariableLocalMap
-
- All Implemented Interfaces:
Map<String,Object>
,VariableMap
public class ProcessVariableLocalMap extends Object
Allows to expose the local process variables of the current business process as a java.util.MapThe map delegates changes to BusinessProcess.setVariableLocal(String, Object)
andBusinessProcess.getVariableLocal(String)
, so that they are not flushed prematurely.- Author:
- Michael Scholz
-
-
Field Summary
Fields Modifier and Type Field Description protected BusinessProcess
businessProcess
-
Constructor Summary
Constructors Constructor Description ProcessVariableLocalMap()
-
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(Object key)
boolean
containsValue(Object value)
Set<Map.Entry<String,Object>>
entrySet()
Object
get(Object key)
<T> T
getValue(String name, Class<T> type)
<T extends TypedValue>
TgetValueTyped(String name)
protected Object
getVariable(String variableName)
protected <T extends TypedValue>
TgetVariableTyped(String variableName)
boolean
isEmpty()
Set<String>
keySet()
Object
put(String key, Object value)
void
putAll(Map<? extends String,? extends Object> m)
VariableMap
putValue(String name, Object value)
VariableMap
putValueTyped(String name, TypedValue value)
Object
remove(Object key)
protected void
setVariable(String variableName, Object value)
int
size()
Collection<Object>
values()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Field Detail
-
businessProcess
@Inject protected BusinessProcess businessProcess
-
-
Method Detail
-
getVariableTyped
protected <T extends TypedValue> T getVariableTyped(String variableName)
-
getValue
public <T> T getValue(String name, Class<T> type)
- Specified by:
getValue
in interfaceVariableMap
-
getValueTyped
public <T extends TypedValue> T getValueTyped(String name)
- Specified by:
getValueTyped
in interfaceVariableMap
-
putValue
public VariableMap putValue(String name, Object value)
- Specified by:
putValue
in interfaceVariableMap
-
putValueTyped
public VariableMap putValueTyped(String name, TypedValue value)
- Specified by:
putValueTyped
in interfaceVariableMap
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interfaceMap<String,Object>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue
in interfaceMap<String,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
-
-