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 Object
get(String p_strKey)
Returns a value of the given binding.Object
get(String p_strKey, Object p_fallback)
Returns the value of the bindingObject
getAt(String p_strKey)
Object
getProperty(String p_strKey)
boolean
isAvailable(String p_strKey)
void
putAt(String p_strKey, Object p_value)
void
setProperty(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
null
if 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
null
binding value.
-
isAvailable
public boolean isAvailable(String p_strKey)
- Parameters:
p_strKey
- The binding key.- Returns:
- Returns
true
if 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.
-
-