|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.grails.plugins.AbstractGrailsPluginManager org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager
public class DefaultGrailsPluginManager extends AbstractGrailsPluginManager
Handles the loading and management of plug-ins in the Grails system. A plugin is just like a normal Grails application except that it contains a file ending in *Plugin.groovy in the root of the directory.
A Plugin class is a Groovy class that has a version and optionally closures called doWithSpring, doWithContext and doWithWebDescriptor
The doWithSpring closure uses the BeanBuilder syntax (
Field Summary | |
---|---|
protected static java.lang.Class[] |
COMMON_CLASSES
|
Fields inherited from class AbstractGrailsPluginManager | |
---|---|
CONFIG_FILE, application, applicationContext, classNameToPluginMap, failedPlugins, initialised, loadCorePlugins, pluginClasses, pluginList, pluginResources, plugins, shutdown |
Constructor Summary | |
DefaultGrailsPluginManager(java.lang.String resourcePath, GrailsApplication application)
|
|
DefaultGrailsPluginManager(java.lang.String[] pluginResources, GrailsApplication application)
|
|
DefaultGrailsPluginManager(java.lang.Class[] plugins, GrailsApplication application)
|
|
DefaultGrailsPluginManager(org.springframework.core.io.Resource[] pluginFiles, GrailsApplication application)
|
Method Summary | |
---|---|
protected boolean
|
canRegisterPlugin(GrailsPlugin plugin)
|
void
|
checkForChanges()
|
protected GrailsPlugin
|
createGrailsPlugin(java.lang.Class pluginClass)
|
protected GrailsPlugin
|
createGrailsPlugin(java.lang.Class pluginClass, org.springframework.core.io.Resource resource)
|
void
|
doDynamicMethods()
|
void
|
doWebDescriptor(org.springframework.core.io.Resource descriptor, java.io.Writer target)
|
void
|
doWebDescriptor(java.io.File descriptor, java.io.Writer target)
|
protected void
|
evictPlugin(GrailsPlugin evictor, java.lang.String evicteeName)
|
java.util.Collection
|
getPluginObservers(GrailsPlugin plugin)
|
javax.servlet.ServletContext
|
getServletContext()
|
GrailsPlugin[]
|
getUserPlugins()
|
void
|
informObservers(java.lang.String pluginName, java.util.Map event)
|
void
|
loadPlugins()
|
void
|
refreshPlugin(java.lang.String name)
|
void
|
reloadPlugin(GrailsPlugin plugin)
|
void
|
setApplication(GrailsApplication application)
|
void
|
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
|
void
|
setParentApplicationContext(org.springframework.context.ApplicationContext parent)
|
void
|
setServletContext(javax.servlet.ServletContext servletContext)
|
void
|
startPluginChangeScanner()
@deprecated Will be removed in a future version of Grails |
void
|
stopPluginChangeScanner()
@deprecated Will be removed in a future version of Grails |
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Field Detail |
---|
protected static final java.lang.Class[] COMMON_CLASSES
Constructor Detail |
---|
public DefaultGrailsPluginManager(java.lang.String resourcePath, GrailsApplication application)
public DefaultGrailsPluginManager(java.lang.String[] pluginResources, GrailsApplication application)
public DefaultGrailsPluginManager(java.lang.Class[] plugins, GrailsApplication application)
public DefaultGrailsPluginManager(org.springframework.core.io.Resource[] pluginFiles, GrailsApplication application)
Method Detail |
---|
protected boolean canRegisterPlugin(GrailsPlugin plugin)
plugin.doWithApplicationContext(applicationContext); public void checkForChanges()
protected GrailsPlugin createGrailsPlugin(java.lang.Class pluginClass)
protected GrailsPlugin createGrailsPlugin(java.lang.Class pluginClass, org.springframework.core.io.Resource resource)
} public void doDynamicMethods()
public void doWebDescriptor(org.springframework.core.io.Resource descriptor, java.io.Writer target)
public void doWebDescriptor(java.io.File descriptor, java.io.Writer target)
protected void evictPlugin(GrailsPlugin evictor, java.lang.String evicteeName)
public java.util.Collection getPluginObservers(GrailsPlugin plugin)
public javax.servlet.ServletContext getServletContext()
public GrailsPlugin[] getUserPlugins()
public void informObservers(java.lang.String pluginName, java.util.Map event)
public void loadPlugins()
public void refreshPlugin(java.lang.String name)
public void reloadPlugin(GrailsPlugin plugin)
registry.removeMetaClass(COMMON_CLASS); public void setApplication(GrailsApplication application)
*/ public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
public void setParentApplicationContext(org.springframework.context.ApplicationContext parent)
public void setServletContext(javax.servlet.ServletContext servletContext)
// do nothing public void startPluginChangeScanner()
} public void stopPluginChangeScanner()
Groovy Documentation