Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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, 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)`
`protected java.util.Map` | `resolveLoadDependencies(java.util.List plugins)`
`void` | `setApplication(GrailsApplication application)`
`void` | `setApplicationContext(org.springframework.context.ApplicationContext applicationContext)`
`void` | `setParentApplicationContext(org.springframework.context.ApplicationContext parent)`
`void` | `setServletContext(javax.servlet.ServletContext servletContext)`
`protected java.util.List` | `sortPlugins(java.util.List toSort)`
`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, isShutdown, registerProvidedArtefacts, setApplication, setApplicationContext, setLoadCorePlugins, shutdown, supportsCurrentBuildScope

Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), 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

    @java.lang.Deprecatedplugin.doWithApplicationContext(applicationContext);
    public void checkForChanges()

### createGrailsPlugin

    protected GrailsPlugin createGrailsPlugin(java.lang.Class pluginClass)

### createGrailsPlugin

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

### doDynamicMethods

    @java.lang.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()

### informObservers

    @java.lang.SuppressWarnings
    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)

### resolveLoadDependencies

    protected java.util.Map resolveLoadDependencies(java.util.List plugins)

### setApplication

    @java.lang.Overrideregistry.removeMetaClass(COMMON_CLASS);
    public void setApplication(GrailsApplication application)

### setApplicationContext

    @java.lang.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)

### sortPlugins

    protected java.util.List sortPlugins(java.util.List toSort)

### startPluginChangeScanner

    @java.lang.Deprecated// do nothing
    public void startPluginChangeScanner()

  deprecated:
    Will be removed in a future version of Grails

### stopPluginChangeScanner

    @java.lang.Deprecated}
    public void stopPluginChangeScanner()

  deprecated:
    Will be removed in a future version of Grails

Groovy Documentation