public abstract class AbstractGrailsPlugin extends groovy.lang.GroovyObjectSupport implements GrailsPlugin
| Modifier and Type | Field and Description |
|---|---|
protected GrailsApplication |
application |
protected org.springframework.context.ApplicationContext |
applicationContext |
protected java.util.Map<java.lang.String,java.lang.Object> |
dependencies |
protected java.lang.String[] |
dependencyNames |
protected java.lang.String[] |
evictionList |
protected boolean |
isBase |
protected GrailsPluginManager |
manager |
protected java.lang.Class<?> |
pluginClass |
protected java.lang.String |
version |
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, OBSERVE, 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, TYPE_FILTERS, WATCHED_RESOURCES| Constructor and Description |
|---|
AbstractGrailsPlugin(java.lang.Class<?> pluginClass,
GrailsApplication application) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkForChanges()
When called this method checks for any changes to the plug-ins watched resources
and reloads appropriately
|
int |
compareTo(java.lang.Object o) |
void |
doWithWebDescriptor(org.w3c.dom.Element webXml)
Handles processing of web.xml.
|
boolean |
equals(java.lang.Object o) |
java.lang.String[] |
getDependencyNames() |
java.lang.String |
getDependentVersion(java.lang.String name)
The version of the specified dependency
|
java.lang.String[] |
getEvictionNames() |
java.lang.String |
getFileSystemName()
Returns the name of the plugin as represented in the file system including the version.
|
java.lang.String |
getFileSystemShortName()
Returns the name of the plugin as represented on the file system without the version.
|
java.lang.String[] |
getLoadAfterNames()
Retrieves the names of plugins that this plugin should be loaded after.
|
java.lang.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
|
java.lang.String |
getName() |
java.lang.Class<?> |
getPluginClass()
Returns the underlying class that represents this plugin
|
java.lang.String |
getPluginPath()
Returns the path of the plug-in
|
java.lang.String |
getVersion() |
java.util.List<org.codehaus.groovy.grails.plugins.support.WatchPattern> |
getWatchedResourcePatterns()
Resources that this plugin watches
|
int |
hashCode() |
boolean |
hasInterestInChange(java.lang.String path)
Whether the plugin is interested in a particular change
|
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(org.springframework.context.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
|
getMetaClass, getProperty, invokeMethod, setMetaClass, setPropertyclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaddExclude, addExclude, doArtefactConfiguration, doc, doWithApplicationContext, doWithDynamicMethods, doWithRuntimeConfiguration, getInstance, getObservedPluginNames, getPluginExcludes, getProvidedArtefacts, getTypeFilters, isEnabled, notifyOfEvent, notifyOfEvent, setDescriptor, supportsCurrentScopeAndEnvironment, supportsEnvironment, supportsScopeprotected GrailsApplication application
protected boolean isBase
protected java.lang.String version
protected java.util.Map<java.lang.String,java.lang.Object> dependencies
protected java.lang.String[] dependencyNames
protected java.lang.Class<?> pluginClass
protected org.springframework.context.ApplicationContext applicationContext
protected GrailsPluginManager manager
protected java.lang.String[] evictionList
public AbstractGrailsPlugin(java.lang.Class<?> pluginClass,
GrailsApplication application)
public void refresh()
GrailsPluginrefresh in interface GrailsPluginpublic java.lang.String getFileSystemName()
GrailsPlugingetFileSystemName in interface GrailsPluginpublic java.lang.String getFileSystemShortName()
GrailsPlugingetFileSystemShortName in interface GrailsPluginpublic java.lang.Class<?> getPluginClass()
GrailsPlugingetPluginClass in interface GrailsPluginpublic boolean isBasePlugin()
GrailsPluginisBasePlugin in interface GrailsPluginpublic void setBasePlugin(boolean isBase)
GrailsPluginsetBasePlugin in interface GrailsPluginisBase - True if isGrailsPlugin.isBasePlugin()public java.util.List<org.codehaus.groovy.grails.plugins.support.WatchPattern> getWatchedResourcePatterns()
GrailsPlugingetWatchedResourcePatterns in interface GrailsPluginpublic boolean hasInterestInChange(java.lang.String path)
GrailsPluginhasInterestInChange in interface GrailsPluginpath - The path to the resource that changedpublic boolean checkForChanges()
GrailsPlugincheckForChanges in interface GrailsPluginpublic void doWithWebDescriptor(org.w3c.dom.Element webXml)
GrailsPlugindoWithWebDescriptor in interface GrailsPluginwebXml - The GPathResult representing web.xmlpublic java.lang.String[] getDependencyNames()
getDependencyNames in interface GrailsPluginpublic java.lang.String getDependentVersion(java.lang.String name)
GrailsPlugingetDependentVersion in interface GrailsPluginname - the name of the dependencypublic java.lang.String getName()
getName in interface org.codehaus.groovy.grails.plugins.GrailsPluginInfopublic java.lang.String getVersion()
getVersion in interface org.codehaus.groovy.grails.plugins.GrailsPluginInfopublic java.lang.String getPluginPath()
GrailsPlugingetPluginPath in interface GrailsPluginpublic GrailsPluginManager getManager()
GrailsPlugingetManager in interface GrailsPluginpublic java.lang.String[] getLoadAfterNames()
GrailsPlugingetLoadAfterNames in interface GrailsPluginpublic java.lang.String[] getLoadBeforeNames()
GrailsPlugingetLoadBeforeNames in interface GrailsPluginpublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic void setManager(GrailsPluginManager manager)
GrailsPluginsetManager in interface GrailsPluginmanager - A GrailsPluginManager instancepublic void setApplication(GrailsApplication application)
setApplication in interface GrailsPluginpublic java.lang.String[] getEvictionNames()
getEvictionNames in interface GrailsPluginpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparable