@groovy.transform.CompileStatic abstract class Plugin
Super class for plugins to implement. Plugin implementations should define the various plugin hooks (doWithSpring, doWithApplicationContext, doWithDynamicMethods etc.)
| Type | Name and description |
|---|---|
java.util.List<ArtefactHandler> |
artefactsList of ArtefactHandler instances provided by this plugin |
boolean |
enabledWhether the plugin is enabled |
grails.util.Environment |
environmentThe current Grails grails.util.Environment |
GrailsApplication |
grailsApplicationThe GrailsApplication instance |
GrailsPlugin |
pluginThe GrailsPlugin definition for this plugin |
GrailsPluginManager |
pluginManagerThe GrailsPluginManager instance |
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
beans(groovy.lang.Closure beanDefinitions)Allows a plugin to define beans at runtime. |
|
void |
doWithApplicationContext()Invokes once the org.springframework.context.ApplicationContext has been refreshed and after {#doWithDynamicMethods()} is invoked. |
|
void |
doWithDynamicMethods()Invoked in a phase where plugins can add dynamic methods. |
|
groovy.lang.Closure |
doWithSpring()Sub classes should override to provide implementations |
|
org.springframework.context.ConfigurableApplicationContext |
getApplicationContext()@return The ApplicationContext |
|
Config |
getConfig()@return The Config instance for this plugin |
|
GrailsPluginManager |
getManager()The GrailsPluginManager instance |
|
void |
onChange(java.util.Map<java.lang.String, java.lang.Object> event)Invoked when a object this plugin is watching changes |
|
void |
onConfigChange(java.util.Map<java.lang.String, java.lang.Object> event)Invoked when the application configuration changes |
|
void |
onShutdown(java.util.Map<java.lang.String, java.lang.Object> event)Invoked when the org.springframework.context.ApplicationContext is closed |
|
void |
onStartup(java.util.Map<java.lang.String, java.lang.Object> event) |
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
| Methods inherited from class | Name |
|---|---|
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() |
List of ArtefactHandler instances provided by this plugin
Whether the plugin is enabled
The current Grails grails.util.Environment
The GrailsApplication instance
The GrailsPlugin definition for this plugin
The GrailsPluginManager instance
Allows a plugin to define beans at runtime. Used primarily for reloading in development mode
beanDefinitions - The bean definitionsInvokes once the org.springframework.context.ApplicationContext has been refreshed and after {#doWithDynamicMethods()} is invoked. Subclasses should override
Invoked in a phase where plugins can add dynamic methods. Subclasses should override
Sub classes should override to provide implementations
The GrailsPluginManager instance
Invoked when a object this plugin is watching changes
event - The eventInvoked when the application configuration changes
event - The eventInvoked when the org.springframework.context.ApplicationContext is closed
event - The event