com.fatwire.gst.foundation.groovy
Class DiskGroovyLoader

java.lang.Object
  extended by com.fatwire.gst.foundation.groovy.DiskGroovyLoader
All Implemented Interfaces:
GroovyLoader
Direct Known Subclasses:
GroovyElementCatalogLoader

public class DiskGroovyLoader
extends Object
implements GroovyLoader

Loader for groovy script classes, configured via the ServletContext

Since:
Mar 28, 2011
Author:
Dolf Dijkstra

Constructor Summary
DiskGroovyLoader()
           
DiskGroovyLoader(javax.servlet.ServletContext servletContext)
           
 
Method Summary
 void bootEngine(String path)
           
protected  void doDir(File dir)
           
 String getConfigPath()
           
 groovy.util.GroovyScriptEngine getGroovyScriptEngine()
           
 int getMinimumRecompilationInterval()
           
 Object load(String name)
           
 void precompile()
           
 void setConfigPath(String configPath)
           
 void setGroovyScriptEngine(groovy.util.GroovyScriptEngine groovyScrptEngine)
           
 void setMinimumRecompilationInterval(int minimumRecompilationInterval)
          Sets the minimumRecompilationInterval of the GroovyScriptEngine configuration.
protected  String toClassName(String name)
           
protected  String toScriptName(String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiskGroovyLoader

public DiskGroovyLoader()

DiskGroovyLoader

public DiskGroovyLoader(javax.servlet.ServletContext servletContext)
Method Detail

bootEngine

public void bootEngine(String path)

load

public Object load(String name)
            throws Exception
Specified by:
load in interface GroovyLoader
Parameters:
name - the name of the class
Returns:
the Object loaded by Groovy
Throws:
Exception

toScriptName

protected String toScriptName(String name)

toClassName

protected String toClassName(String name)

precompile

public void precompile()

doDir

protected void doDir(File dir)

getConfigPath

public String getConfigPath()
Returns:
the configPath

setConfigPath

public void setConfigPath(String configPath)
Parameters:
configPath - the configPath to set

getMinimumRecompilationInterval

public int getMinimumRecompilationInterval()
Returns:
the minimumRecompilationInterval

setMinimumRecompilationInterval

public void setMinimumRecompilationInterval(int minimumRecompilationInterval)
Sets the minimumRecompilationInterval of the GroovyScriptEngine configuration.

Parameters:
minimumRecompilationInterval - the minimumRecompilationInterval to set

getGroovyScriptEngine

public groovy.util.GroovyScriptEngine getGroovyScriptEngine()

setGroovyScriptEngine

public void setGroovyScriptEngine(groovy.util.GroovyScriptEngine groovyScrptEngine)


Copyright © 2010-2013 Oracle Corporation. All Rights Reserved.