Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.webengine.scripting
Class GroovyScripting

java.lang.Object
  extended by org.nuxeo.ecm.webengine.scripting.GroovyScripting

public class GroovyScripting
extends 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

Constructor Summary
GroovyScripting()
           
GroovyScripting(boolean debug)
           
GroovyScripting(ClassLoader parent, boolean debug)
           
GroovyScripting(ClassLoader parent, org.codehaus.groovy.control.CompilerConfiguration cfg)
           
 
Method Summary
 void addClasspath(String cp)
           
 void addClasspathUrl(URL cp)
           
 void clearCache()
           
 Class<?> compile(File file)
           
 Object eval(File file, groovy.lang.Binding context)
           
 Object eval(File file, Map<String,Object> context)
           
 groovy.lang.GroovyClassLoader getGroovyClassLoader()
           
static ClassLoader getParentLoader()
           
 groovy.lang.Script getScript(File file, groovy.lang.Binding context)
           
 Class<?> loadClass(String className)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroovyScripting

public GroovyScripting()

GroovyScripting

public GroovyScripting(boolean debug)

GroovyScripting

public GroovyScripting(ClassLoader parent,
                       boolean debug)

GroovyScripting

public GroovyScripting(ClassLoader parent,
                       org.codehaus.groovy.control.CompilerConfiguration cfg)
Method Detail

getParentLoader

public static ClassLoader getParentLoader()

addClasspath

public void addClasspath(String cp)

addClasspathUrl

public void addClasspathUrl(URL cp)

clearCache

public void clearCache()

loadClass

public Class<?> loadClass(String className)
                   throws ClassNotFoundException
Throws:
ClassNotFoundException

getGroovyClassLoader

public groovy.lang.GroovyClassLoader getGroovyClassLoader()

eval

public Object eval(File file,
                   Map<String,Object> context)
            throws IOException
Throws:
IOException

eval

public Object eval(File file,
                   groovy.lang.Binding context)
            throws IOException
Throws:
IOException

compile

public Class<?> compile(File file)
                 throws IOException
Throws:
IOException

getScript

public groovy.lang.Script getScript(File file,
                                    groovy.lang.Binding context)
                             throws IOException
Throws:
IOException

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.