public abstract class AbstractGrailsPlugin extends GroovyObjectSupport implements 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, 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<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(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
|
getClass, notify, notifyAll, toString, wait, wait, wait
addExclude, addExclude, doArtefactConfiguration, doc, doWithApplicationContext, doWithDynamicMethods, doWithRuntimeConfiguration, getInstance, getObservedPluginNames, getPluginExcludes, getProvidedArtefacts, getTypeFilters, isEnabled, notifyOfEvent, notifyOfEvent, setDescriptor, supportsCurrentScopeAndEnvironment, supportsEnvironment, supportsScope
public AbstractGrailsPlugin(java.lang.Class<?> pluginClass, GrailsApplication application)
public void refresh()
GrailsPlugin
refresh
in interface GrailsPlugin
public java.lang.String getFileSystemName()
GrailsPlugin
getFileSystemName
in interface GrailsPlugin
public java.lang.String getFileSystemShortName()
GrailsPlugin
getFileSystemShortName
in interface GrailsPlugin
public java.lang.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 java.util.List<WatchPattern> getWatchedResourcePatterns()
GrailsPlugin
getWatchedResourcePatterns
in interface GrailsPlugin
public boolean hasInterestInChange(java.lang.String path)
GrailsPlugin
hasInterestInChange
in interface GrailsPlugin
path
- The path to the resource that changedpublic boolean checkForChanges()
GrailsPlugin
checkForChanges
in interface GrailsPlugin
public void doWithWebDescriptor(org.w3c.dom.Element webXml)
GrailsPlugin
doWithWebDescriptor
in interface GrailsPlugin
webXml
- The GPathResult representing web.xmlpublic java.lang.String[] getDependencyNames()
getDependencyNames
in interface GrailsPlugin
public java.lang.String getDependentVersion(java.lang.String name)
GrailsPlugin
getDependentVersion
in interface GrailsPlugin
name
- the name of the dependencypublic java.lang.String getName()
public java.lang.String getVersion()
public java.lang.String getPluginPath()
GrailsPlugin
getPluginPath
in interface GrailsPlugin
public GrailsPluginManager getManager()
GrailsPlugin
getManager
in interface GrailsPlugin
public java.lang.String[] getLoadAfterNames()
GrailsPlugin
getLoadAfterNames
in interface GrailsPlugin
public java.lang.String[] getLoadBeforeNames()
GrailsPlugin
getLoadBeforeNames
in interface GrailsPlugin
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
BeansException
public void setManager(GrailsPluginManager manager)
GrailsPlugin
setManager
in interface GrailsPlugin
manager
- A GrailsPluginManager instancepublic void setApplication(GrailsApplication application)
setApplication
in interface GrailsPlugin
public java.lang.String[] getEvictionNames()
getEvictionNames
in interface GrailsPlugin
public boolean equals(java.lang.Object o)
public int hashCode()
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable