DefaultGrailsPluginManager (Grails 4.0.3)
Date: 2020-04-03

Package: grails.plugins

## [Java] Class DefaultGrailsPluginManager

- grails.plugins.DefaultGrailsPluginManager

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

  See Also:
    BeanBuilder<p<p<p<p<p<p>>>>>>
  Authors:
    Graeme Rocher
  Since:
    0.4

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected static java.lang.Class<?>[]` | `COMMON_CLASSES` |

  - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class AbstractGrailsPluginManager` | `CONFIG_FILE, BEAN_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `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)`
    `DefaultGrailsPluginManager (GrailsApplication application)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `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()`
    `` | `protected void` | `evictPlugin(GrailsPlugin evictor, java.lang.String evicteeName)`
    `` | `java.util.Collection<GrailsPlugin>` | `getPluginObservers(GrailsPlugin plugin)`
    `` | `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<GrailsPlugin, java.util.List<GrailsPlugin>>` | `resolveLoadDependencies(java.util.List<GrailsPlugin> plugins)`
    `` | `void` | `setApplication(GrailsApplication application)`
    `` | `void` | `setApplicationContext(org.springframework.context.ApplicationContext applicationContext)`
    `` | `void` | `setParentApplicationContext(org.springframework.context.ApplicationContext parent)`
    `` | `void` | `setPluginFilter(PluginFilter pluginFilter)`
    `` | `protected java.util.List<GrailsPlugin>` | `sortPlugins(java.util.List<GrailsPlugin> toSort)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class AbstractGrailsPluginManager` | `setApplicationContext, getTypeFilters, getAllPlugins, getFailedLoadPlugins, isInitialised, getFailedPlugin, doRuntimeConfiguration, doRuntimeConfiguration, doPostProcessing, getPluginResources, getGrailsPlugin, getGrailsPlugin, getGrailsPluginForClassName, hasGrailsPlugin, doDynamicMethods, setApplication, registerProvidedArtefacts, doArtefactConfiguration, onStartup, isShutdown, setPluginFilter, setLoadCorePlugins, informOfClassChange, informOfClassChange, getPluginPath, getPluginPath, getPluginPathForInstance, getPluginForInstance, getPluginForClass, informPluginsOfConfigChange, informOfFileChange, getPluginPathForClass, getPluginViewsPathForInstance, getPluginViewsPathForClass, shutdown, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll, getUserPlugins, loadPlugins, checkForChanges, refreshPlugin, getPluginObservers, informObservers`
    `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

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

    - #### public DefaultGrailsPluginManager(GrailsApplication application)

  - ### Method Detail

    - #### protected boolean canRegisterPlugin(GrailsPlugin plugin)

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

    - #### @java.lang.Override public void doDynamicMethods()

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

    - #### public java.util.Collection<GrailsPlugin> getPluginObservers(GrailsPlugin plugin)

    - #### public GrailsPlugin[] getUserPlugins()

    - #### @java.lang.SuppressWarnings("rawtypes") 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)

    - #### protected java.util.Map<GrailsPlugin, java.util.List<GrailsPlugin>> resolveLoadDependencies(java.util.List<GrailsPlugin> plugins)

    - #### @java.lang.Override public void setApplication(GrailsApplication application)

    - #### @java.lang.Override public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)

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

    - #### public void setPluginFilter(PluginFilter pluginFilter)

    - #### protected java.util.List<GrailsPlugin> sortPlugins(java.util.List<GrailsPlugin> toSort)