Package com.axelor.script
Class SandboxScript
java.lang.Object
groovy.lang.GroovyObjectSupport
groovy.lang.Script
com.axelor.script.SandboxScript
- All Implemented Interfaces:
SandboxCode,groovy.lang.GroovyObject
Base class of the scripts and templates compiled by
GroovyScriptSupport.
Script methods that compile and run other code do so in a fresh GroovyShell
without the policy's compilation customizers, which would escape the sandbox. They are overridden
here to throw, so they are denied however they are dispatched (direct call, dynamic method name,
invokeMethod, closure delegation...).
This class also marks sandboxed code, see GroovySandbox.denyFromSandbox(String).
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class groovy.lang.Script
getBinding, getProperty, invokeMethod, print, printf, printf, println, println, run, setBinding, setPropertyMethods inherited from class groovy.lang.GroovyObjectSupport
getMetaClass, setMetaClass
-
Constructor Details
-
SandboxScript
protected SandboxScript() -
SandboxScript
protected SandboxScript(groovy.lang.Binding binding)
-
-
Method Details
-
evaluate
- Overrides:
evaluatein classgroovy.lang.Script
-
evaluate
- Overrides:
evaluatein classgroovy.lang.Script
-
run
- Overrides:
runin classgroovy.lang.Script
-