it.eng.spagobi.behaviouralmodel.lov.handlers
Class ScriptManager

java.lang.Object
  extended by it.eng.spagobi.behaviouralmodel.lov.handlers.ScriptManager

public class ScriptManager
extends java.lang.Object


Constructor Summary
ScriptManager()
           
 
Method Summary
static groovy.lang.Binding fillBinding(java.util.HashMap attrs)
          Fill a groovy binding with attributes of an hashmap.
static groovy.lang.Binding fillBinding(it.eng.spago.security.IEngUserProfile profile)
          Fill a groovy binding with attributes of a user profile.
static java.lang.String runScript(java.lang.String script)
          Run a script.
static java.lang.String runScript(java.lang.String script, groovy.lang.Binding bind)
          Run a script.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptManager

public ScriptManager()
Method Detail

runScript

public static java.lang.String runScript(java.lang.String script,
                                         groovy.lang.Binding bind)
                                  throws java.lang.Exception
Run a script.

Parameters:
script - the script to run
bind - the bindings for script variables
Returns:
the result of the script
Throws:
java.lang.Exception - the exception

runScript

public static java.lang.String runScript(java.lang.String script)
                                  throws java.lang.Exception
Run a script.

Parameters:
script - the script to run
Returns:
the result of the script
Throws:
java.lang.Exception - the exception

fillBinding

public static groovy.lang.Binding fillBinding(java.util.HashMap attrs)
Fill a groovy binding with attributes of an hashmap.

Parameters:
attrs - Map of attibutes to load into binding
Returns:
the groovy binding object

fillBinding

public static groovy.lang.Binding fillBinding(it.eng.spago.security.IEngUserProfile profile)
                                       throws it.eng.spago.error.EMFInternalError
Fill a groovy binding with attributes of a user profile.

Parameters:
profile - the profile
Returns:
the groovy binding object
Throws:
it.eng.spago.error.EMFInternalError - the EMF internal error