|
||||||||||
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 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 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. |
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 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 String getFileSystemName()
GrailsPlugin
getFileSystemName
in interface GrailsPlugin
public String getFileSystemShortName()
GrailsPlugin
getFileSystemShortName
in interface GrailsPlugin
public Class getPluginClass()
GrailsPlugin
getPluginClass
in interface GrailsPlugin
public boolean isBasePlugin()
GrailsPlugin
isBasePlugin
in interface GrailsPlugin
public void setBasePlugin(boolean isBase)
GrailsPlugin
setBasePlugin
in interface GrailsPlugin
isBase
- True if isGrailsPlugin.isBasePlugin()
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 String getPluginPath()
GrailsPlugin
getPluginPath
in interface GrailsPlugin
public GrailsPluginManager getManager()
GrailsPlugin
getManager
in interface GrailsPlugin
public String[] getLoadAfterNames()
GrailsPlugin
getLoadAfterNames
in interface GrailsPlugin
public String[] getLoadBeforeNames()
GrailsPlugin
getLoadBeforeNames
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
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public int compareTo(Object o)
compareTo
in interface Comparable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |