|
||||||||||
| 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 boolean |
isBase
|
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, ENVIRONMENTS, EVENT_ON_CHANGE, EVENT_ON_CONFIG_CHANGE, EVENT_ON_SHUTDOWN, EVICT, INFLUENCES, NAME, ON_CHANGE, ON_CONFIG_CHANGE, ON_SHUTDOWN, PLUGIN_EXCLUDES, PLUGIN_LOAD_AFTER_NAMES, PLUGIN_LOAD_BEFORE_NAMES, PLUGINS_PATH, PROVIDED_ARTEFACTS, SCOPES, STATUS, STATUS_DISABLED, STATUS_ENABLED, TRAILING_NAME, TYPE_FILTERS, 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 |
int |
compareTo(Object o)
|
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. |
boolean |
equals(Object o)
|
String[] |
getDependencyNames()
|
String |
getDependentVersion(String name)
The version of the specified dependency |
String[] |
getEvictionNames()
|
String |
getFileSystemName()
Returns the name of the plugin as represented in the file system including the version. |
String |
getFileSystemShortName()
Returns the name of the plugin as represented on the file system without the version. |
String[] |
getLoadAfterNames()
Retrieves the names of plugins that this plugin should be loaded after. |
String[] |
getLoadBeforeNames()
Retrieves the names of plugins that this plugin should be loaded before. |
GrailsPluginManager |
getManager()
Retrieves the plugin manager if known, otherwise returns null |
String |
getName()
|
Class |
getPluginClass()
Returns the underlying class that represents this plugin |
String |
getPluginPath()
Returns the path of the plug-in |
String |
getVersion()
|
int |
hashCode()
|
boolean |
isBasePlugin()
Returns whether this plugin is loaded from the current plugin. |
void |
refresh()
Refreshes this Grails plugin reloading any watched resources as necessary |
void |
setApplication(GrailsApplication application)
|
void |
setApplicationContext(ApplicationContext applicationContext)
|
void |
setBasePlugin(boolean isBase)
Sets whether this plugin is the base plugin |
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, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.codehaus.groovy.grails.plugins.GrailsPlugin |
|---|
doc, doWithDynamicMethods, getInstance, getObservedPluginNames, getPluginExcludes, getProvidedArtefacts, getTypeFilters, isEnabled, notifyOfEvent, notifyOfEvent, supportsCurrentScopeAndEnvironment, supportsEnvironment, supportsScope |
| Field Detail |
|---|
protected GrailsApplication application
protected boolean isBase
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 String getFileSystemName()
GrailsPlugin
getFileSystemName in interface GrailsPluginpublic String getFileSystemShortName()
GrailsPlugin
getFileSystemShortName in interface GrailsPluginpublic Class getPluginClass()
GrailsPlugin
getPluginClass in interface GrailsPluginpublic boolean isBasePlugin()
GrailsPlugin
isBasePlugin in interface GrailsPluginpublic void setBasePlugin(boolean isBase)
GrailsPlugin
setBasePlugin in interface GrailsPluginisBase - True if isGrailsPlugin.isBasePlugin()public 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 String getPluginPath()
GrailsPlugin
getPluginPath in interface GrailsPluginpublic GrailsPluginManager getManager()
GrailsPlugin
getManager in interface GrailsPluginpublic String[] getLoadAfterNames()
GrailsPlugin
getLoadAfterNames in interface GrailsPluginpublic String[] getLoadBeforeNames()
GrailsPlugin
getLoadBeforeNames 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 GrailsPluginpublic boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic int compareTo(Object o)
compareTo in interface Comparable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||