|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.grails.plugins.AbstractGrailsPluginManager
public abstract class AbstractGrailsPluginManager
Abstract implementation of the GrailsPluginManager interface
Field Summary | |
---|---|
protected GrailsApplication |
application
|
protected ApplicationContext |
applicationContext
|
protected Map<String,GrailsPlugin> |
classNameToPluginMap
|
protected Map<String,GrailsPlugin> |
failedPlugins
|
protected boolean |
initialised
|
protected boolean |
loadCorePlugins
|
protected Class[] |
pluginClasses
|
protected List<GrailsPlugin> |
pluginList
|
protected Resource[] |
pluginResources
|
protected Map<String,GrailsPlugin> |
plugins
|
Fields inherited from interface org.codehaus.groovy.grails.plugins.GrailsPluginManager |
---|
BEAN_NAME |
Constructor Summary | |
---|---|
AbstractGrailsPluginManager(GrailsApplication application)
|
Method Summary | |
---|---|
protected void |
checkInitialised()
|
void |
doArtefactConfiguration()
Called prior to the initialisation of the GrailsApplication object to allow registration of additional ArtefactHandler objects |
void |
doDynamicMethods()
This is called on all plugins so that they can add new methods/properties/constructors etc. |
void |
doPostProcessing(ApplicationContext applicationContext)
Base implementation that will simply go through each plugin and call doWithApplicationContext on each |
void |
doRuntimeConfiguration(RuntimeSpringConfiguration springConfig)
Base implementation that simply goes through the list of plugins and calls doWithRuntimeConfiguration on each |
void |
doRuntimeConfiguration(String pluginName,
RuntimeSpringConfiguration springConfig)
Base implementation that will perform runtime configuration for the specified plugin name |
GrailsPlugin[] |
getAllPlugins()
Returns an array of all the loaded plug-ins |
GrailsPlugin[] |
getFailedLoadPlugins()
|
GrailsPlugin |
getFailedPlugin(String name)
Retrieves a plug-in that failed to load, or null if it doesn't exist |
GrailsPlugin |
getGrailsPlugin(String name)
Retrieves a name Grails plugin instance |
GrailsPlugin |
getGrailsPlugin(String name,
Object version)
Retrieves a plug-in for its name and version |
GrailsPlugin |
getGrailsPluginForClassName(String name)
Obtains a GrailsPlugin for the given classname |
String |
getPluginPath(String name)
Returns the pluginContextPath for the given plugin |
String |
getPluginPathForClass(Class<? extends Object> theClass)
Returns the plugin path for the given class |
String |
getPluginPathForInstance(Object instance)
Returns the pluginContextPath for the given instance |
Resource[] |
getPluginResources()
|
String |
getPluginViewsPathForClass(Class<? extends Object> theClass)
Returns the plugin views directory path for the given class |
String |
getPluginViewsPathForInstance(Object instance)
Returns the plugin views directory for the given instance |
List<TypeFilter> |
getTypeFilters()
Get all of the TypeFilter definitions defined by the plugins |
boolean |
hasGrailsPlugin(String name)
|
void |
informOfClassChange(Class aClass)
Method for handling changes to a class and triggering on change events etc. |
boolean |
isInitialised()
|
void |
registerProvidedArtefacts(GrailsApplication application)
Registers pre-compiled artefacts with the GrailsApplication instance, only overriding if the application doesn't already provide an artefact of the same name |
void |
setApplication(GrailsApplication application)
Sets the GrailsApplication used be this plugin manager |
void |
setApplicationContext(ApplicationContext applicationContext)
|
void |
setLoadCorePlugins(boolean shouldLoadCorePlugins)
Set whether the core plugins should be loaded |
void |
shutdown()
Shuts down the PluginManager |
boolean |
supportsCurrentBuildScope(String pluginName)
Returns true if the given plugin supports the current BuildScope |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.codehaus.groovy.grails.plugins.GrailsPluginManager |
---|
checkForChanges, doWebDescriptor, doWebDescriptor, getPluginObservers, getUserPlugins, informObservers, loadPlugins, refreshPlugin |
Methods inherited from interface org.springframework.web.context.ServletContextAware |
---|
setServletContext |
Field Detail |
---|
protected List<GrailsPlugin> pluginList
protected GrailsApplication application
protected Resource[] pluginResources
protected Map<String,GrailsPlugin> plugins
protected Map<String,GrailsPlugin> classNameToPluginMap
protected Class[] pluginClasses
protected boolean initialised
protected ApplicationContext applicationContext
protected Map<String,GrailsPlugin> failedPlugins
protected boolean loadCorePlugins
Constructor Detail |
---|
public AbstractGrailsPluginManager(GrailsApplication application)
Method Detail |
---|
public List<TypeFilter> getTypeFilters()
GrailsPluginManager
getTypeFilters
in interface GrailsPluginManager
public GrailsPlugin[] getAllPlugins()
GrailsPluginManager
getAllPlugins
in interface GrailsPluginManager
public GrailsPlugin[] getFailedLoadPlugins()
getFailedLoadPlugins
in interface GrailsPluginManager
public boolean isInitialised()
isInitialised
in interface GrailsPluginManager
protected void checkInitialised()
public GrailsPlugin getFailedPlugin(String name)
GrailsPluginManager
getFailedPlugin
in interface GrailsPluginManager
name
- The name of the plugin
public void doRuntimeConfiguration(RuntimeSpringConfiguration springConfig)
doRuntimeConfiguration
in interface GrailsPluginManager
springConfig
- The RuntimeSpringConfiguration instancepublic void doRuntimeConfiguration(String pluginName, RuntimeSpringConfiguration springConfig)
doRuntimeConfiguration
in interface GrailsPluginManager
pluginName
- The name of he pluginspringConfig
- The runtime spring config instancepublic void doPostProcessing(ApplicationContext applicationContext)
doPostProcessing
in interface GrailsPluginManager
applicationContext
- The ApplicationContext instancepublic Resource[] getPluginResources()
public GrailsPlugin getGrailsPlugin(String name)
GrailsPluginManager
getGrailsPlugin
in interface GrailsPluginManager
name
- The name of the plugin
public GrailsPlugin getGrailsPluginForClassName(String name)
GrailsPluginManager
getGrailsPluginForClassName
in interface GrailsPluginManager
name
- The name of the plugin
public GrailsPlugin getGrailsPlugin(String name, Object version)
GrailsPluginManager
getGrailsPlugin
in interface GrailsPluginManager
name
- The name of the pluginversion
- The version of the plugin
public boolean hasGrailsPlugin(String name)
hasGrailsPlugin
in interface GrailsPluginManager
name
- The name of the plugin
public void doDynamicMethods()
GrailsPluginManager
doDynamicMethods
in interface GrailsPluginManager
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
setApplicationContext
in interface ApplicationContextAware
BeansException
public void setApplication(GrailsApplication application)
GrailsPluginManager
setApplication
in interface GrailsPluginManager
application
- The GrailsApplication instancepublic void registerProvidedArtefacts(GrailsApplication application)
GrailsPluginManager
registerProvidedArtefacts
in interface GrailsPluginManager
application
- The GrailsApplication objectpublic void doArtefactConfiguration()
GrailsPluginManager
doArtefactConfiguration
in interface GrailsPluginManager
ArtefactHandler
public void shutdown()
GrailsPluginManager
shutdown
in interface GrailsPluginManager
public boolean supportsCurrentBuildScope(String pluginName)
GrailsPluginManager
supportsCurrentBuildScope
in interface GrailsPluginManager
pluginName
- The name of the plugin
BuildScope.getCurrent()
public void setLoadCorePlugins(boolean shouldLoadCorePlugins)
GrailsPluginManager
setLoadCorePlugins
in interface GrailsPluginManager
shouldLoadCorePlugins
- True if they shouldpublic void informOfClassChange(Class aClass)
GrailsPluginManager
informOfClassChange
in interface GrailsPluginManager
aClass
- The classpublic String getPluginPath(String name)
GrailsPluginManager
getPluginPath
in interface GrailsPluginManager
name
- The plugin name
public String getPluginPathForInstance(Object instance)
GrailsPluginManager
getPluginPathForInstance
in interface GrailsPluginManager
instance
- The instance
public String getPluginPathForClass(Class<? extends Object> theClass)
GrailsPluginManager
getPluginPathForClass
in interface GrailsPluginManager
theClass
- The class
public String getPluginViewsPathForInstance(Object instance)
GrailsPluginManager
getPluginViewsPathForInstance
in interface GrailsPluginManager
instance
- The instance
public String getPluginViewsPathForClass(Class<? extends Object> theClass)
GrailsPluginManager
getPluginViewsPathForClass
in interface GrailsPluginManager
theClass
- The class
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |