Groovy Documentation

org.codehaus.groovy.grails.plugins
[Java] Class DefaultGrailsPluginManager

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 (

Authors:
Graeme Rocher
See Also:
BeanBuilder
Since:
0.4


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
 
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()

@deprecated Replaced by agent-based reloading, will be removed in a future version of Grails

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()

static java.lang.String getWeb23DTD()

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 AbstractGrailsPluginManager
checkInitialised, doArtefactConfiguration, doDynamicMethods, doPostProcessing, doRuntimeConfiguration, doRuntimeConfiguration, getAllPlugins, getFailedLoadPlugins, getFailedPlugin, getGrailsPlugin, getGrailsPlugin, getGrailsPluginForClassName, getPluginForClass, getPluginForInstance, getPluginPath, getPluginPathForClass, getPluginPathForInstance, getPluginResources, getPluginViewsPathForClass, getPluginViewsPathForInstance, getTypeFilters, hasGrailsPlugin, informOfClassChange, informOfClassChange, informOfFileChange, informPluginsOfConfigChange, isInitialised, registerProvidedArtefacts, setApplication, setApplicationContext, setLoadCorePlugins, shutdown, supportsCurrentBuildScope
 
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

COMMON_CLASSES

protected static final java.lang.Class[] COMMON_CLASSES


 
Constructor Detail

DefaultGrailsPluginManager

public DefaultGrailsPluginManager(java.lang.String resourcePath, GrailsApplication application)


DefaultGrailsPluginManager

public DefaultGrailsPluginManager(java.lang.String[] pluginResources, GrailsApplication application)


DefaultGrailsPluginManager

public DefaultGrailsPluginManager(java.lang.Class[] plugins, GrailsApplication application)


DefaultGrailsPluginManager

public DefaultGrailsPluginManager(org.springframework.core.io.Resource[] pluginFiles, GrailsApplication application)


 
Method Detail

canRegisterPlugin

protected boolean canRegisterPlugin(GrailsPlugin plugin)


checkForChanges

@Deprecated
public void checkForChanges()
deprecated:
Replaced by agent-based reloading, will be removed in a future version of Grails


createGrailsPlugin

protected GrailsPlugin createGrailsPlugin(java.lang.Class pluginClass)


createGrailsPlugin

protected GrailsPlugin createGrailsPlugin(java.lang.Class pluginClass, org.springframework.core.io.Resource resource)


doDynamicMethods

@Override
public void doDynamicMethods()


doWebDescriptor

public void doWebDescriptor(org.springframework.core.io.Resource descriptor, java.io.Writer target)


doWebDescriptor

public void doWebDescriptor(java.io.File descriptor, java.io.Writer target)


evictPlugin

protected void evictPlugin(GrailsPlugin evictor, java.lang.String evicteeName)


getPluginObservers

public java.util.Collection getPluginObservers(GrailsPlugin plugin)


getServletContext

public javax.servlet.ServletContext getServletContext()


getUserPlugins

public GrailsPlugin[] getUserPlugins()


getWeb23DTD

public static java.lang.String getWeb23DTD()


informObservers

@SuppressWarnings("rawtypes")
public void informObservers(java.lang.String pluginName, java.util.Map event)


loadPlugins

public void loadPlugins()


refreshPlugin

public void refreshPlugin(java.lang.String name)


reloadPlugin

public void reloadPlugin(GrailsPlugin plugin)


setApplication

@Override
public void setApplication(GrailsApplication application)


setApplicationContext

@Override
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)


setParentApplicationContext

public void setParentApplicationContext(org.springframework.context.ApplicationContext parent)


setServletContext

public void setServletContext(javax.servlet.ServletContext servletContext)


startPluginChangeScanner

@Deprecated
public void startPluginChangeScanner()
deprecated:
Will be removed in a future version of Grails


stopPluginChangeScanner

@Deprecated
public void stopPluginChangeScanner()
deprecated:
Will be removed in a future version of Grails


 

Groovy Documentation