org.nuxeo.ecm.webengine.scripting
Class GroovyScripting
java.lang.Object
org.nuxeo.ecm.webengine.scripting.GroovyScripting
public class GroovyScripting
- extends java.lang.Object
For Groovy we are not using the javax.script API because we need more control over debug mode and
script class loader.
Groovy scritps will be processed by this class
- Author:
- Bogdan Stefanescu
Method Summary |
void |
addClasspath(java.lang.String cp)
|
void |
addClasspathUrl(java.net.URL cp)
|
void |
clearCache()
|
java.lang.Class<?> |
compile(java.io.File file)
|
java.lang.Object |
eval(java.io.File file,
groovy.lang.Binding context)
|
java.lang.Object |
eval(java.io.File file,
java.util.Map<java.lang.String,java.lang.Object> context)
|
groovy.lang.GroovyClassLoader |
getGroovyClassLoader()
|
static java.lang.ClassLoader |
getParentLoader()
|
groovy.lang.Script |
getScript(java.io.File file,
groovy.lang.Binding context)
|
java.lang.Class<?> |
loadClass(java.lang.String className)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GroovyScripting
public GroovyScripting()
GroovyScripting
public GroovyScripting(boolean debug)
GroovyScripting
public GroovyScripting(java.lang.ClassLoader parent,
boolean debug)
GroovyScripting
public GroovyScripting(java.lang.ClassLoader parent,
org.codehaus.groovy.control.CompilerConfiguration cfg)
getParentLoader
public static java.lang.ClassLoader getParentLoader()
addClasspath
public void addClasspath(java.lang.String cp)
addClasspathUrl
public void addClasspathUrl(java.net.URL cp)
clearCache
public void clearCache()
loadClass
public java.lang.Class<?> loadClass(java.lang.String className)
throws java.lang.ClassNotFoundException
- Throws:
java.lang.ClassNotFoundException
getGroovyClassLoader
public groovy.lang.GroovyClassLoader getGroovyClassLoader()
eval
public java.lang.Object eval(java.io.File file,
java.util.Map<java.lang.String,java.lang.Object> context)
throws java.io.IOException
- Throws:
java.io.IOException
eval
public java.lang.Object eval(java.io.File file,
groovy.lang.Binding context)
throws java.io.IOException
- Throws:
java.io.IOException
compile
public java.lang.Class<?> compile(java.io.File file)
throws java.io.IOException
- Throws:
java.io.IOException
getScript
public groovy.lang.Script getScript(java.io.File file,
groovy.lang.Binding context)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2010 Nuxeo SAS. All Rights Reserved.