|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgroovy.lang.GroovyObjectSupport
org.codehaus.groovy.grails.plugins.AbstractGrailsPlugin
public abstract class AbstractGrailsPlugin
Abstract implementation that provides some default behaviours
| Nested Class Summary | |
|---|---|
(package private) class |
AbstractGrailsPlugin.GrailsPluginClass
Wrapper Grails class for plugins |
| Field Summary | |
|---|---|
protected GrailsApplication |
application
|
protected ApplicationContext |
applicationContext
|
protected Map |
dependencies
|
protected String[] |
dependencyNames
|
protected String[] |
evictionList
|
protected GrailsPluginManager |
manager
|
protected Class |
pluginClass
|
protected String |
version
|
| Fields inherited from interface org.codehaus.groovy.grails.plugins.GrailsPlugin |
|---|
ARTEFACTS, DEPENDS_ON, DO_WITH_APPLICATION_CONTEXT, DO_WITH_DYNAMIC_METHODS, DO_WITH_SPRING, DO_WITH_WEB_DESCRIPTOR, EVENT_ON_CHANGE, EVENT_ON_CONFIG_CHANGE, EVICT, INFLUENCES, ON_CHANGE, ON_CONFIG_CHANGE, PROVIDED_ARTEFACTS, STATUS, STATUS_DISABLED, STATUS_ENABLED, TRAILING_NAME, VERSION, WATCHED_RESOURCES |
| Constructor Summary | |
|---|---|
AbstractGrailsPlugin(Class pluginClass,
GrailsApplication application)
|
|
| Method Summary | |
|---|---|
boolean |
checkForChanges()
When called this method checks for any changes to the plug-ins watched resources and reloads appropriately |
abstract void |
doArtefactConfiguration()
Called prior to the initialisation of the GrailsApplication instance to allow the registration of additonal ArtefactHandlers |
abstract void |
doWithApplicationContext(ApplicationContext applicationContext)
This method is called to allow the plugin to add BeanDefinitions
to the BeanDefinitionRegistry. |
abstract void |
doWithRuntimeConfiguration(RuntimeSpringConfiguration springConfig)
Executes the plugin code that performs runtime configuration as defined in the doWithSpring closure |
void |
doWithWebDescriptor(groovy.util.slurpersupport.GPathResult webXml)
Handles processing of web.xml. |
String[] |
getDependencyNames()
|
String |
getDependentVersion(String name)
The version of the specified dependency |
String[] |
getEvictionNames()
|
String[] |
getLoadAfterNames()
Retrieves the names of plugins that this plugin should be loaded after. |
GrailsPluginManager |
getManager()
Retrieves the plugin manager if known, otherwise returns null |
String |
getName()
|
String |
getVersion()
|
void |
refresh()
Refreshes this Grails plugin reloading any watched resources as necessary |
void |
setApplication(GrailsApplication application)
|
void |
setApplicationContext(ApplicationContext applicationContext)
|
void |
setManager(GrailsPluginManager manager)
Sets the plugin manager for this plugin |
| Methods inherited from class groovy.lang.GroovyObjectSupport |
|---|
getMetaClass, getProperty, invokeMethod, setMetaClass, setProperty |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.codehaus.groovy.grails.plugins.GrailsPlugin |
|---|
doWithDynamicMethods, getInstance, getObservedPluginNames, getProvidedArtefacts, isEnabled, notifyOfEvent, notifyOfEvent |
| Field Detail |
|---|
protected GrailsApplication application
protected String version
protected Map dependencies
protected String[] dependencyNames
protected Class pluginClass
protected ApplicationContext applicationContext
protected GrailsPluginManager manager
protected String[] evictionList
| Constructor Detail |
|---|
public AbstractGrailsPlugin(Class pluginClass,
GrailsApplication application)
| Method Detail |
|---|
public void refresh()
GrailsPlugin
refresh in interface GrailsPluginpublic abstract void doWithApplicationContext(ApplicationContext applicationContext)
GrailsPluginThis method is called to allow the plugin to add BeanDefinitions
to the BeanDefinitionRegistry.
doWithApplicationContext in interface GrailsPluginapplicationContext - The Spring ApplicationContext instancepublic abstract void doWithRuntimeConfiguration(RuntimeSpringConfiguration springConfig)
GrailsPlugin
doWithRuntimeConfiguration in interface GrailsPluginspringConfig - The RuntimeSpringConfiguration instancepublic abstract void doArtefactConfiguration()
GrailsPlugin
doArtefactConfiguration in interface GrailsPluginArtefactHandlerpublic boolean checkForChanges()
GrailsPlugin
checkForChanges in interface GrailsPluginpublic void doWithWebDescriptor(groovy.util.slurpersupport.GPathResult webXml)
GrailsPlugin
doWithWebDescriptor in interface GrailsPluginwebXml - The GPathResult representing web.xmlpublic String[] getDependencyNames()
getDependencyNames in interface GrailsPluginpublic String getDependentVersion(String name)
GrailsPlugin
getDependentVersion in interface GrailsPluginname - the name of the dependency
public String getName()
getName in interface GrailsPluginpublic String getVersion()
getVersion in interface GrailsPluginpublic GrailsPluginManager getManager()
GrailsPlugin
getManager in interface GrailsPluginpublic String[] getLoadAfterNames()
GrailsPlugin
getLoadAfterNames in interface GrailsPlugin
public void setApplicationContext(ApplicationContext applicationContext)
throws BeansException
setApplicationContext in interface ApplicationContextAwareBeansExceptionpublic void setManager(GrailsPluginManager manager)
GrailsPlugin
setManager in interface GrailsPluginmanager - A GrailsPluginManager instancepublic void setApplication(GrailsApplication application)
setApplication in interface GrailsPluginpublic String[] getEvictionNames()
getEvictionNames in interface GrailsPlugin
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||