com.flexive.shared.scripting
Class FxScriptBinding

java.lang.Object
  extended by com.flexive.shared.scripting.FxScriptBinding
All Implemented Interfaces:
java.io.Serializable

public class FxScriptBinding
extends java.lang.Object
implements java.io.Serializable

Variable binding for scripting. If groovy's binding object would have been serializable, this class could be rendered useless ...

Author:
Markus Plesser (markus.plesser@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)
See Also:
Serialized Form

Constructor Summary
FxScriptBinding()
          Constructor
FxScriptBinding(java.util.Map<java.lang.String,java.lang.Object> properties)
          Constructor
 
Method Summary
 java.util.Map<java.lang.String,java.lang.Object> getProperties()
          Get the properties map
 java.lang.Object getVariable(java.lang.String name)
          Get a Variable, will throw an FxNotFoundException if the variable is not set
 java.lang.Object getVariableOrNull(java.lang.String name)
          Get the variable or null if the variable is not set
 void setVariable(java.lang.String name, java.lang.Object value)
          Sets the value of the given variable
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FxScriptBinding

public FxScriptBinding()
Constructor


FxScriptBinding

public FxScriptBinding(java.util.Map<java.lang.String,java.lang.Object> properties)
Constructor

Parameters:
properties - the properties to set
Since:
3.1.4
Method Detail

getProperties

public java.util.Map<java.lang.String,java.lang.Object> getProperties()
Get the properties map

Returns:
properties map

getVariable

public java.lang.Object getVariable(java.lang.String name)
                             throws FxNotFoundException
Get a Variable, will throw an FxNotFoundException if the variable is not set

Parameters:
name - the name of the variable to lookup
Returns:
the variable value
Throws:
FxNotFoundException - if no variable with that name exists

getVariableOrNull

public java.lang.Object getVariableOrNull(java.lang.String name)
Get the variable or null if the variable is not set

Parameters:
name - the name of the variable to lookup
Returns:
variable value or null
Since:
3.1.4

setVariable

public void setVariable(java.lang.String name,
                        java.lang.Object value)
Sets the value of the given variable

Parameters:
name - the name of the variable to set
value - the new value for the given variable

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object