it.eng.spagobi.managers
Class ScriptManager

java.lang.Object
  extended by it.eng.spagobi.managers.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
equals, 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

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

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:
attrs - User Profile which contains attributes to load into a binding
Returns:
the groovy binding object
Throws:
it.eng.spago.error.EMFInternalError