Class GroovyBinding
- java.lang.Object
-
- groovy.lang.GroovyObjectSupport
-
- de.uplanet.lucy.server.businesslogic.util.scriptable.GroovyBinding
-
- All Implemented Interfaces:
groovy.lang.GroovyObject
@Scriptable public class GroovyBinding extends groovy.lang.GroovyObjectSupport
-
-
Constructor Summary
Constructors Constructor Description GroovyBinding(IBinding p_binding)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectget(String p_strKey)Returns a value of the given binding.Objectget(String p_strKey, Object p_fallback)Returns the value of the bindingObjectgetAt(String p_strKey)ObjectgetProperty(String p_strKey)booleanisAvailable(String p_strKey)voidputAt(String p_strKey, Object p_value)voidsetProperty(String p_strKey, Object p_value)
-
-
-
Constructor Detail
-
GroovyBinding
public GroovyBinding(IBinding p_binding)
-
-
Method Detail
-
get
public Object get(String p_strKey)
Returns a value of the given binding.- Parameters:
p_strKey- The binding key- Returns:
- The value or
nullif no value found for the binding.
-
get
public Object get(String p_strKey, Object p_fallback)
Returns the value of the binding- Parameters:
p_strKey- The binding keyp_fallback- The fallback value. Will returned when no value found or the binding value isnull.- Returns:
- The binding value or the given fallback value for a not
existing or an
nullbinding value.
-
isAvailable
public boolean isAvailable(String p_strKey)
- Parameters:
p_strKey- The binding key.- Returns:
- Returns
trueif an binding value exists otherwisefalse.
-
setProperty
public void setProperty(String p_strKey, Object p_value)
- Throws:
UnsupportedOperationException- Since the binding is read-only.
-
putAt
public void putAt(String p_strKey, Object p_value)
- Throws:
UnsupportedOperationException- Since the binding is read-only.
-
-