DefaultGrailsPlugin (Grails 2.3.8)
Date: 2014-04-24

Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.grails.plugins
[Java] Class DefaultGrailsPlugin

    java.lang.Object
      groovy.lang.GroovyObjectSupport
          org.codehaus.groovy.grails.plugins.AbstractGrailsPlugin
              org.codehaus.groovy.grails.plugins.DefaultGrailsPlugin

All Implemented Interfaces:
  ParentApplicationContextAware

    @java.lang.SuppressWarnings("rawtypes")
    public class DefaultGrailsPlugin
    extends AbstractGrailsPlugin

Implementation of the GrailsPlugin interface that wraps a Groovy plugin class and provides the magic to invoke its various methods from Java.

Authors:
  Graeme Rocher

Since:
  0.4

Field Summary
`protected static org.apache.commons.logging.Log` | `LOG`
`protected org.springframework.beans.BeanWrapper` | `pluginBean`

Fields inherited from class AbstractGrailsPlugin
application, applicationContext, dependencies, dependencyNames, evictionList, isBase, manager, pluginClass, version

Constructor Summary
`DefaultGrailsPlugin(java.lang.Class pluginClass, org.springframework.core.io.Resource resource, GrailsApplication application)`
`DefaultGrailsPlugin(java.lang.Class pluginClass, GrailsApplication application)`

Method Summary
`void` | `addExclude(BuildScope buildScope)`
`void` | `addExclude(Environment env)`
`BeanBuilder` | `beans(groovy.lang.Closure closure)`
`boolean` | `checkForChanges()` Monitors the plugin resources defined in the watchResources property for changes and fires onChange events by calling an onChange closure defined in the plugin (if it exists)
`void` | `doArtefactConfiguration()`
`void` | `doWithApplicationContext(org.springframework.context.ApplicationContext ctx)`
`void` | `doWithDynamicMethods(org.springframework.context.ApplicationContext ctx)`
`void` | `doWithRuntimeConfiguration(RuntimeSpringConfiguration springConfig)`
`void` | `doWithWebDescriptor(org.w3c.dom.Element webXml)`
`void` | `doc(java.lang.String text)` @deprecated Dynamic document generation no longer supported
`java.lang.String[]` | `getDependencyNames()`
`java.lang.String` | `getDependentVersion(java.lang.String name)`
`Resource` | `getDescriptor()`
`java.lang.String` | `getFullName()`
`groovy.lang.GroovyObject` | `getInstance()`
`java.lang.String[]` | `getLoadAfterNames()`
`java.lang.String[]` | `getLoadBeforeNames()`
`org.apache.commons.logging.Log` | `getLog()`
`java.lang.String` | `getName()`
`java.lang.String[]` | `getObservedPluginNames()`
`org.springframework.context.ApplicationContext` | `getParentCtx()`
`GrailsPlugin` | `getPlugin()`
`Resource` | `getPluginDir()`
`java.util.List` | `getPluginExcludes()`
`java.util.Map` | `getProperties()`
`java.lang.Class[]` | `getProvidedArtefacts()`
`org.springframework.core.io.support.PathMatchingResourcePatternResolver` | `getResolver()` @return the resolver
`java.util.Collection` | `getTypeFilters()`
`java.util.List` | `getWatchedResourcePatterns()`
`org.springframework.core.io.Resource[]` | `getWatchedResources()` @return the watchedResources
`boolean` | `hasInterestInChange(java.lang.String path)`
`boolean` | `isEnabled()`
`void` | `notifyOfEvent(java.util.Map event)`
`java.util.Map` | `notifyOfEvent(int eventKind, java.lang.Object source)`
`void` | `refresh()`
`void` | `restartContainer()` Restarts the container
`void` | `setDescriptor(org.springframework.core.io.Resource descriptor)`
`void` | `setParentApplicationContext(org.springframework.context.ApplicationContext parent)`
`void` | `setWatchedResources(org.springframework.core.io.Resource[] watchedResources)`
`boolean` | `supportsCurrentScopeAndEnvironment()`
`boolean` | `supportsEnvironment(Environment environment)`
`boolean` | `supportsScope(BuildScope buildScope)`
`java.lang.String` | `toString()`

Methods inherited from class AbstractGrailsPlugin
AbstractGrailsPlugin, checkForChanges, compareTo, doWithWebDescriptor, equals, getDependencyNames, getDependentVersion, getEvictionNames, getFileSystemName, getFileSystemShortName, getLoadAfterNames, getLoadBeforeNames, getManager, getName, getPluginClass, getPluginPath, getVersion, getWatchedResourcePatterns, hasInterestInChange, hashCode, isBasePlugin, refresh, setApplication, setApplicationContext, setBasePlugin, setManager

Methods inherited from class groovy.lang.GroovyObjectSupport
groovy.lang.GroovyObjectSupport#getMetaClass(), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), groovy.lang.GroovyObjectSupport#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#setProperty(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getProperty(java.lang.String), groovy.lang.GroovyObjectSupport#wait(long, int), groovy.lang.GroovyObjectSupport#wait(long), groovy.lang.GroovyObjectSupport#wait(), groovy.lang.GroovyObjectSupport#equals(java.lang.Object), groovy.lang.GroovyObjectSupport#toString(), groovy.lang.GroovyObjectSupport#hashCode(), groovy.lang.GroovyObjectSupport#getClass(), groovy.lang.GroovyObjectSupport#notify(), groovy.lang.GroovyObjectSupport#notifyAll()

Field Detail

### LOG

    protected static final org.apache.commons.logging.Log LOG

### pluginBean

    protected org.springframework.beans.BeanWrapper pluginBean

Constructor Detail

### DefaultGrailsPlugin

    public DefaultGrailsPlugin(java.lang.Class pluginClass, org.springframework.core.io.Resource resource, GrailsApplication application)

### DefaultGrailsPlugin

    public DefaultGrailsPlugin(java.lang.Class pluginClass, GrailsApplication application)

Method Detail

### addExclude

    public void addExclude(BuildScope buildScope)

### addExclude

    public void addExclude(Environment env)

### beans

    public BeanBuilder beans(groovy.lang.Closure closure)

### checkForChanges

    @java.lang.Override
    @java.lang.Deprecated/**
    public boolean checkForChanges()

  Monitors the plugin resources defined in the watchResources property for changes and fires onChange events by calling an onChange closure defined in the plugin (if it exists)
  deprecated:

### doArtefactConfiguration

    public void doArtefactConfiguration()

### doWithApplicationContext

    public void doWithApplicationContext(org.springframework.context.ApplicationContext ctx)

### doWithDynamicMethods

    public void doWithDynamicMethods(org.springframework.context.ApplicationContext ctx)

### doWithRuntimeConfiguration

    public void doWithRuntimeConfiguration(RuntimeSpringConfiguration springConfig)

### doWithWebDescriptor

    @java.lang.Override
    public void doWithWebDescriptor(org.w3c.dom.Element webXml)

### doc

    @java.lang.Deprecated}
    public void doc(java.lang.String text)

  deprecated:
    Dynamic document generation no longer supported
  Parameters:
    text

### getDependencyNames

    @java.lang.Override
    public java.lang.String[] getDependencyNames()

### getDependentVersion

    @java.lang.Override}
    public java.lang.String getDependentVersion(java.lang.String name)

### getDescriptor

    public Resource getDescriptor()

### getFullName

    public java.lang.String getFullName()

### getInstance

    public groovy.lang.GroovyObject getInstance()

### getLoadAfterNames

    @java.lang.Override}
    public java.lang.String[] getLoadAfterNames()

### getLoadBeforeNames

    @java.lang.Override}
    public java.lang.String[] getLoadBeforeNames()

### getLog

    public org.apache.commons.logging.Log getLog()

### getName

    @java.lang.Override}
    public java.lang.String getName()

### getObservedPluginNames

    public java.lang.String[] getObservedPluginNames()

### getParentCtx

    public org.springframework.context.ApplicationContext getParentCtx()

### getPlugin

    public GrailsPlugin getPlugin()

### getPluginDir

    public Resource getPluginDir()

### getPluginExcludes

    public java.util.List getPluginExcludes()

### getProperties

    public java.util.Map getProperties()

### getProvidedArtefacts

    public java.lang.Class[] getProvidedArtefacts()

### getResolver

    public org.springframework.core.io.support.PathMatchingResourcePatternResolver getResolver()

  Returns:
    the resolver

### getTypeFilters

    public java.util.Collection getTypeFilters()

### getWatchedResourcePatterns

    @java.lang.Overridepublic List getWatchedResourcePatterns() {
    public java.util.List getWatchedResourcePatterns()

### getWatchedResources

    public org.springframework.core.io.Resource[] getWatchedResources()

  Returns:
    the watchedResources

### hasInterestInChange

    @java.lang.Overridepublic boolean hasInterestInChange(String path) {
    public boolean hasInterestInChange(java.lang.String path)

### isEnabled

    public boolean isEnabled()

### notifyOfEvent

    public void notifyOfEvent(java.util.Map event)

### notifyOfEvent

    public java.util.Map notifyOfEvent(int eventKind, java.lang.Object source)

### refresh

    @java.lang.OverrideClassLoader parent = application.getClassLoader();
    public void refresh()

### restartContainer

    @java.lang.Deprecatedthis.watchedResources = watchedResources;
    public void restartContainer()

  Restarts the container
  deprecated:
    Not needed any more due to the reload agent

### setDescriptor

    public void setDescriptor(org.springframework.core.io.Resource descriptor)

### setParentApplicationContext

    public void setParentApplicationContext(org.springframework.context.ApplicationContext parent)

### setWatchedResources

    public void setWatchedResources(org.springframework.core.io.Resource[] watchedResources)

### supportsCurrentScopeAndEnvironment

    public boolean supportsCurrentScopeAndEnvironment()

### supportsEnvironment

    public boolean supportsEnvironment(Environment environment)

### supportsScope

    public boolean supportsScope(BuildScope buildScope)

### toString

    @java.lang.Override
    public java.lang.String toString()

Groovy Documentation