|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object groovy.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 BeanDefinition s
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 GrailsPlugin
public abstract void doWithApplicationContext(ApplicationContext applicationContext)
GrailsPlugin
This method is called to allow the plugin to add BeanDefinition
s
to the BeanDefinitionRegistry
.
doWithApplicationContext
in interface GrailsPlugin
applicationContext
- The Spring ApplicationContext instancepublic abstract void doWithRuntimeConfiguration(RuntimeSpringConfiguration springConfig)
GrailsPlugin
doWithRuntimeConfiguration
in interface GrailsPlugin
springConfig
- The RuntimeSpringConfiguration instancepublic abstract void doArtefactConfiguration()
GrailsPlugin
doArtefactConfiguration
in interface GrailsPlugin
ArtefactHandler
public boolean checkForChanges()
GrailsPlugin
checkForChanges
in interface GrailsPlugin
public void doWithWebDescriptor(groovy.util.slurpersupport.GPathResult webXml)
GrailsPlugin
doWithWebDescriptor
in interface GrailsPlugin
webXml
- The GPathResult representing web.xmlpublic String[] getDependencyNames()
getDependencyNames
in interface GrailsPlugin
public String getDependentVersion(String name)
GrailsPlugin
getDependentVersion
in interface GrailsPlugin
name
- the name of the dependency
public String getName()
getName
in interface GrailsPlugin
public String getVersion()
getVersion
in interface GrailsPlugin
public GrailsPluginManager getManager()
GrailsPlugin
getManager
in interface GrailsPlugin
public String[] getLoadAfterNames()
GrailsPlugin
getLoadAfterNames
in interface GrailsPlugin
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
setApplicationContext
in interface ApplicationContextAware
BeansException
public void setManager(GrailsPluginManager manager)
GrailsPlugin
setManager
in interface GrailsPlugin
manager
- A GrailsPluginManager instancepublic void setApplication(GrailsApplication application)
setApplication
in interface GrailsPlugin
public String[] getEvictionNames()
getEvictionNames
in interface GrailsPlugin
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |