Class ScriptBindings
- java.lang.Object
-
- org.camunda.bpm.engine.impl.scripting.engine.ScriptBindings
-
public class ScriptBindings extends Object implements Bindings
A
Bindings
implementation which wraps an existing binding and enhances the key / value map with read-only access to:- variables provided in a
VariableScope
, - additional bindings provided through a set of
Resolvers
.
Note on backwards compatibility: before 7.2 the Script bindings behaved in a way that all script variables were automatically exposed as process variables. You can enable this behavior by setting
autoStoreScriptVariables
.- Author:
- Tom Baeyens, Daniel Meyer
- variables provided in a
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
autoStoreScriptVariables
if true, all script variables will be set in the variable scope.protected List<Resolver>
scriptResolvers
protected static Set<String>
UNSTORED_KEYS
The script engine implementations put some key/value pairs into the binding.protected VariableScope
variableScope
protected Bindings
wrappedBindings
-
Constructor Summary
Constructors Constructor Description ScriptBindings(List<Resolver> scriptResolvers, VariableScope variableScope, Bindings wrappedBindings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Map<String,Object>
calculateBindingMap()
void
clear()
boolean
containsKey(Object key)
boolean
containsValue(Object value)
Set<Map.Entry<String,Object>>
entrySet()
Object
get(Object key)
protected boolean
isAutoStoreScriptVariablesEnabled()
boolean
isEmpty()
Set<String>
keySet()
Object
put(String name, Object value)
void
putAll(Map<? extends String,? extends Object> toMerge)
Object
remove(Object key)
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
-
UNSTORED_KEYS
protected static final Set<String> UNSTORED_KEYS
The script engine implementations put some key/value pairs into the binding. This list contains those keys, such that they wouldn't be stored as process variable. This list contains the keywords for JUEL, Javascript and Groovy.
-
variableScope
protected VariableScope variableScope
-
wrappedBindings
protected Bindings wrappedBindings
-
autoStoreScriptVariables
protected boolean autoStoreScriptVariables
if true, all script variables will be set in the variable scope.
-
-
Constructor Detail
-
ScriptBindings
public ScriptBindings(List<Resolver> scriptResolvers, VariableScope variableScope, Bindings wrappedBindings)
-
-
Method Detail
-
isAutoStoreScriptVariablesEnabled
protected boolean isAutoStoreScriptVariablesEnabled()
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interfaceBindings
- Specified by:
containsKey
in interfaceMap<String,Object>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue
in interfaceMap<String,Object>
-
-