org.camunda.bpm.engine.impl.scripting.engine
Class ScriptBindings

java.lang.Object
  extended by org.camunda.bpm.engine.impl.scripting.engine.ScriptBindings
All Implemented Interfaces:
Map<String,Object>, Bindings

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:

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

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
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
ScriptBindings(List<Resolver> scriptResolvers, VariableScope variableScope, Bindings wrappedBindings)
           
 
Method Summary
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
equals, hashCode
 

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.


scriptResolvers

protected List<Resolver> scriptResolvers

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 interface Map<String,Object>
Specified by:
containsKey in interface Bindings

get

public Object get(Object key)
Specified by:
get in interface Map<String,Object>
Specified by:
get in interface Bindings

put

public Object put(String name,
                  Object value)
Specified by:
put in interface Map<String,Object>
Specified by:
put in interface Bindings

entrySet

public Set<Map.Entry<String,Object>> entrySet()
Specified by:
entrySet in interface Map<String,Object>

keySet

public Set<String> keySet()
Specified by:
keySet in interface Map<String,Object>

size

public int size()
Specified by:
size in interface Map<String,Object>

values

public Collection<Object> values()
Specified by:
values in interface Map<String,Object>

putAll

public void putAll(Map<? extends String,? extends Object> toMerge)
Specified by:
putAll in interface Map<String,Object>
Specified by:
putAll in interface Bindings

remove

public Object remove(Object key)
Specified by:
remove in interface Map<String,Object>
Specified by:
remove in interface Bindings

clear

public void clear()
Specified by:
clear in interface Map<String,Object>

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map<String,Object>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map<String,Object>

calculateBindingMap

protected Map<String,Object> calculateBindingMap()


Copyright © 2015 camunda services GmbH. All rights reserved.