|
eXo JCR :: Component :: Extension Service 1.15.0-CR2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.services.jcr.ext.script.groovy.JcrGroovyCompiler
public class JcrGroovyCompiler
JcrGroovyCompiler can load source code of groovy script from JCR and parse it via GroovyClassLoader.
| Field Summary | |
|---|---|
protected List<GroovyScriptAddRepoPlugin> |
addRepoPlugins
|
protected JcrGroovyClassLoaderProvider |
classLoaderProvider
|
| Constructor Summary | |
|---|---|
JcrGroovyCompiler()
|
|
JcrGroovyCompiler(JcrGroovyClassLoaderProvider classLoaderProvider)
|
|
| Method Summary | |
|---|---|
Class<?>[] |
compile(org.exoplatform.services.rest.ext.groovy.SourceFile[] files)
Compile Groovy source that located in files. |
Class<?>[] |
compile(org.exoplatform.services.rest.ext.groovy.SourceFolder[] src,
org.exoplatform.services.rest.ext.groovy.SourceFile[] files)
Compile Groovy source that located in files. |
Class<?>[] |
compile(org.exoplatform.services.rest.ext.groovy.SourceFolder[] src,
UnifiedNodeReference... sourceReferences)
Compile Groovy source that located in sourceReferences. |
Class<?>[] |
compile(UnifiedNodeReference... sourceReferences)
Compile Groovy source that located in sourceReferences. |
URL[] |
getDependencies(org.exoplatform.services.rest.ext.groovy.SourceFolder[] sources,
org.exoplatform.services.rest.ext.groovy.SourceFile[] files)
Get URLs of classes (stored in JCR only) required to compile sources files. |
void |
start()
|
void |
stop()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final JcrGroovyClassLoaderProvider classLoaderProvider
protected List<GroovyScriptAddRepoPlugin> addRepoPlugins
| Constructor Detail |
|---|
public JcrGroovyCompiler(JcrGroovyClassLoaderProvider classLoaderProvider)
public JcrGroovyCompiler()
| Method Detail |
|---|
public Class<?>[] compile(UnifiedNodeReference... sourceReferences)
throws IOException
sourceReferences.
Compiled sources can be dependent to each other and dependent to Groovy
sources that are accessible for this compiler.
sourceReferences - references to Groovy sources to be compiled
IOException - if any i/o errors occurs
public Class<?>[] compile(org.exoplatform.services.rest.ext.groovy.SourceFolder[] src,
UnifiedNodeReference... sourceReferences)
throws IOException
sourceReferences.
Compiled sources can be dependent to each other and dependent to Groovy
sources that are accessible for this compiler and with additional Groovy
sources src. NOTE To be able load Groovy source files
from specified folders the following rules must be observed:
package c.b.a
import a.b.c.A
class B extends A {
// Do something.
}
Assume we store dependencies in JCR then URL of folder with Groovy sources
may be like this: jcr://repository/workspace#/groovy-library.
Then absolute path to JCR node that contains Groovy source must be as
following: /groovy-library/a/b/c/A.groovy
src - additional Groovy source location that should be added in
class-path when compile sourceReferencessourceReferences - references to Groovy sources to be compiled
IOException - if any i/o errors occurs
public Class<?>[] compile(org.exoplatform.services.rest.ext.groovy.SourceFolder[] src,
org.exoplatform.services.rest.ext.groovy.SourceFile[] files)
throws IOException
files. Compiled sources
can be dependent to each other and dependent to Groovy sources that are
accessible for this compiler and with additional Groovy sources
src. NOTE To be able load Groovy source files from
specified folders the following rules must be observed:
src - additional Groovy source location that should be added in
class-path when compile filesfiles - Groovy sources to be compiled
IOException - if any i/o errors occurs
public Class<?>[] compile(org.exoplatform.services.rest.ext.groovy.SourceFile[] files)
throws IOException
files. Compiled sources
can be dependent to each other and dependent to Groovy sources that are
accessible for this compiler.
files - Groovy sources to be compiled
IOException - if any i/o errors occurs
public URL[] getDependencies(org.exoplatform.services.rest.ext.groovy.SourceFolder[] sources,
org.exoplatform.services.rest.ext.groovy.SourceFile[] files)
throws IOException
files. Result array includes URLs of files plus
URLs of other required sources if they can be found in class-path.
sources - additional Groovy source location that should be added in
class-path when analyze filesfiles - set of sources for analyzing
IOException - if any i/o errors occurspublic void start()
start in interface org.picocontainer.StartableStartable.start()public void stop()
stop in interface org.picocontainer.StartableStartable.stop()
|
eXo JCR :: Component :: Extension Service 1.15.0-CR2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||