@java.lang.SuppressWarnings("rawtypes") public class DefaultGrailsPlugin extends AbstractGrailsPlugin implements ParentApplicationContextAware
Implementation of the GrailsPlugin interface that wraps a Groovy plugin class and provides the magic to invoke its various methods from Java.
Modifiers | Name | Description |
---|---|---|
private static java.lang.String |
EXCLUDES |
|
private static java.lang.String |
INCLUDES |
|
protected static org.apache.commons.logging.Log |
LOG |
|
private static java.lang.String |
PLUGIN_CHANGE_EVENT_APPLICATION |
|
private static java.lang.String |
PLUGIN_CHANGE_EVENT_CTX |
|
private static java.lang.String |
PLUGIN_CHANGE_EVENT_MANAGER |
|
private static java.lang.String |
PLUGIN_CHANGE_EVENT_PLUGIN |
|
private static java.lang.String |
PLUGIN_CHANGE_EVENT_SOURCE |
|
private java.lang.String[] |
loadAfterNames |
|
private java.lang.String[] |
loadBeforeNames |
|
private java.lang.String[] |
observedPlugins |
|
private groovy.lang.Closure |
onChangeListener |
|
private groovy.lang.Closure |
onConfigChangeListener |
|
private groovy.lang.Closure |
onShutdownListener |
|
private groovy.lang.GroovyObject |
plugin |
|
protected org.springframework.beans.BeanWrapper |
pluginBean |
|
private org.springframework.core.io.Resource |
pluginDescriptor |
|
private java.util.Map |
pluginEnvs |
|
private java.util.List<java.lang.String> |
pluginExcludes |
|
private GrailsPluginClass |
pluginGrailsClass |
|
private java.util.Collection |
profiles |
|
private java.lang.Class<?>[] |
providedArtefacts |
|
private org.springframework.core.io.support.PathMatchingResourcePatternResolver |
resolver |
|
private static long |
serialVersionUID |
|
private java.lang.String |
status |
|
private java.util.Collection<? extends org.springframework.core.type.filter.TypeFilter> |
typeFilters |
|
private java.lang.String[] |
watchedResourcePatternReferences |
|
private java.util.List<WatchPattern> |
watchedResourcePatterns |
|
private org.springframework.core.io.Resource[] |
watchedResources |
Fields inherited from class | Fields |
---|---|
class AbstractGrailsPlugin |
DEFAULT_CONFIG_IGNORE_LIST, LOG, PLUGIN_GROOVY, PLUGIN_GROOVY_PATH, PLUGIN_YML, PLUGIN_YML_PATH, applicationContext, basePluginResource, config, dependencies, dependencyNames, evictionList, grailsApplication, isBase, manager, pluginClass, propertySource, version |
Constructor and description |
---|
DefaultGrailsPlugin
(java.lang.Class<?> pluginClass, org.springframework.core.io.Resource resource, GrailsApplication application) |
DefaultGrailsPlugin
(java.lang.Class<?> pluginClass, GrailsApplication application) |
Type Params | Return Type | Name and description |
---|---|---|
|
private void |
addBaseLocationPattern(java.util.List<java.lang.String> resourceList, java.lang.String baseLocation, java.lang.String pattern) |
|
public void |
addExclude(Environment env) |
|
private void |
addExcludeRuleInternal(java.util.Map map, java.lang.Object o) |
|
public BeanBuilder |
beans(groovy.lang.Closure closure) |
|
public java.lang.Object |
call(java.lang.Object arguments) |
|
private void |
callEvent(groovy.lang.Closure closureHook, java.util.Map event) |
|
public void |
doArtefactConfiguration() |
|
public void |
doWithApplicationContext(org.springframework.context.ApplicationContext ctx) |
|
public void |
doWithDynamicMethods(org.springframework.context.ApplicationContext ctx) |
|
public void |
doWithRuntimeConfiguration(RuntimeSpringConfiguration springConfig) |
|
public void |
doc(java.lang.String text)
|
|
private void |
evaluateAndAddIncludeExcludeObject(java.util.Map targetMap, java.lang.Object includeExcludeObject, boolean include, groovy.lang.Closure converter) |
|
private void |
evaluateAndAddListOfValues(java.util.Map targetMap, java.util.List includeExcludeList, boolean include, groovy.lang.Closure converter) |
|
private void |
evaluateAndAddToIncludeExcludeSet(java.util.Map targetMap, java.lang.String includeExcludeString, boolean include, groovy.lang.Closure converter) |
|
private java.util.Map |
evaluateIncludeExcludeProperty(java.lang.String name, groovy.lang.Closure converter) |
|
private void |
evaluateObservedPlugins() |
|
private void |
evaluateOnChangeListener() |
|
private void |
evaluatePluginDependencies() |
|
private void |
evaluatePluginEvictionPolicy() |
|
private void |
evaluatePluginExcludes() |
|
private void |
evaluatePluginLoadAfters() |
|
private void |
evaluatePluginScopes() |
|
private void |
evaluatePluginStatus() |
|
private void |
evaluatePluginVersion() |
|
private void |
evaluateProfiles() |
|
private void |
evaluateProvidedArtefacts() |
|
private void |
evaluateTypeFilters() |
|
public java.lang.String[] |
getDependencyNames() |
|
public java.lang.String |
getDependentVersion(java.lang.String name) |
|
public Resource |
getDescriptor() |
|
public java.lang.String |
getFullName() |
|
public groovy.lang.GroovyObject |
getInstance() |
|
public java.lang.String[] |
getLoadAfterNames() |
|
public java.lang.String[] |
getLoadBeforeNames() |
|
public org.apache.commons.logging.Log |
getLog() |
|
public java.lang.String |
getName() |
|
public java.lang.String[] |
getObservedPluginNames() |
|
public org.springframework.context.ApplicationContext |
getParentCtx() |
|
public GrailsPlugin |
getPlugin() |
|
public Resource |
getPluginDir() |
|
public java.util.List<java.lang.String> |
getPluginExcludes() |
|
public java.util.Map |
getProperties() |
|
public java.lang.Class<?>[] |
getProvidedArtefacts() |
|
public org.springframework.core.io.support.PathMatchingResourcePatternResolver |
getResolver()
|
|
private java.lang.String |
getResourcePatternForBaseLocation(java.lang.String baseLocation, java.lang.String resourcePath) |
|
public java.util.Collection<? extends org.springframework.core.type.filter.TypeFilter> |
getTypeFilters() |
|
public java.util.List<WatchPattern> |
getWatchedResourcePatterns() |
|
public org.springframework.core.io.Resource[] |
getWatchedResources()
|
|
public boolean |
hasInterestInChange(java.lang.String path) |
|
private void |
initialisePlugin(java.lang.Class<?> clazz) |
|
private void |
invokeOnChangeListener(java.util.Map event) |
|
private void |
invokeOnConfigChangeListener(java.util.Map event) |
|
private void |
invokeOnShutdownEventListener(java.util.Map event) |
|
private void |
invokePluginHook(java.lang.String methodName, java.lang.Object[] args, org.springframework.context.ApplicationContext ctx) |
|
public boolean |
isEnabled(java.lang.String[] activeProfiles) |
|
public boolean |
isEnabled() |
|
private java.util.Set |
lazilyCreateIncludeOrExcludeSet(java.util.Map targetMap, boolean include) |
|
public void |
notifyOfEvent(java.util.Map event) |
|
public java.util.Map |
notifyOfEvent(int eventKind, java.lang.Object source) |
|
public void |
refresh() |
|
public void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
|
public void |
setDescriptor(org.springframework.core.io.Resource descriptor) |
|
public void |
setManager(GrailsPluginManager manager) |
|
public void |
setParentApplicationContext(org.springframework.context.ApplicationContext parent) |
|
public void |
setWatchedResources(org.springframework.core.io.Resource[] watchedResources) |
|
public boolean |
supportsCurrentScopeAndEnvironment() |
|
public boolean |
supportsEnvironment(Environment environment) |
|
private boolean |
supportsValueInIncludeExcludeMap(java.util.Map includeExcludeMap, java.lang.Object value) |
|
public java.lang.String |
toString() |
Methods inherited from class | Name |
---|---|
class AbstractGrailsPlugin |
checkForChanges, compareTo, equals, getConfigurationResource, getDependencyNames, getDependentVersion, getEvictionNames, getFileSystemName, getFileSystemShortName, getLoadAfterNames, getLoadBeforeNames, getManager, getName, getPluginClass, getPluginPath, getPluginPathCamelCase, getPropertySource, getVersion, getWatchedResourcePatterns, hasInterestInChange, hashCode, isBasePlugin, isEnabled, readPluginConfiguration, refresh, setApplication, setApplicationContext, setBasePlugin, setManager |