Groovy Documentation

org.codehaus.groovy.grails.commons.spring
[Java] Class GrailsRuntimeConfigurator

java.lang.Object
  org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator
All Implemented Interfaces:
ApplicationContextAware

public class GrailsRuntimeConfigurator

Handles the runtime configuration of the Grails ApplicationContext.

Authors:
Graeme Rocher
Since:
0.3


Field Summary
static java.lang.String BEAN_ID

static java.lang.String CLASS_EDITOR_BEAN

static java.lang.String CLASS_LOADER_BEAN

static java.lang.String CUSTOM_EDITORS_BEAN

static java.lang.String DATA_SOURCE_BEAN

static java.lang.String DIALECT_DETECTOR_BEAN

static java.lang.String EXCEPTION_HANDLER_BEAN

static java.lang.String GRAILS_URL_MAPPINGS

static java.lang.String HIBERNATE_PROPERTIES_BEAN

static java.lang.String MESSAGE_SOURCE_BEAN

static java.lang.String MULTIPART_RESOLVER_BEAN

static java.lang.String OPEN_SESSION_IN_VIEW_INTERCEPTOR_BEAN

static java.lang.String SESSION_FACTORY_BEAN

static java.lang.String SPRING_RESOURCES_CLASS

static java.lang.String SPRING_RESOURCES_GROOVY

static java.lang.String SPRING_RESOURCES_XML

static java.lang.String TRANSACTION_MANAGER_BEAN

 
Constructor Summary
GrailsRuntimeConfigurator(GrailsApplication application)

GrailsRuntimeConfigurator(GrailsApplication application, ApplicationContext parent)

 
Method Summary
WebApplicationContext configure()

GrailsPlugin.groovy", application); PluginManagerHolder.setPluginManager(pluginManager); } else { LOG.debug("Retrieved thread-bound PluginManager instance"); pluginManager.setApplication(application); } }

WebApplicationContext configure(ServletContext context)

Configures the Grails application context at runtime

WebApplicationContext configure(ServletContext context, boolean loadExternalBeans)

WebApplicationContext configureDomainOnly()

protected WebRuntimeSpringConfiguration createWebRuntimeSpringConfiguration(GrailsApplication app, ApplicationContext parentCtx, java.lang.ClassLoader classLoader)

GrailsPluginManager getPluginManager()

static void loadExternalSpringConfig(RuntimeSpringConfiguration config, GrailsApplication application)

Loads any external Spring configuration into the given RuntimeSpringConfiguration object.

static void loadSpringGroovyResources(RuntimeSpringConfiguration config, GrailsApplication application)

static void loadSpringGroovyResourcesIntoContext(RuntimeSpringConfiguration config, GrailsApplication application, GenericApplicationContext context)

void reconfigure(GrailsApplicationContext current, ServletContext servletContext, boolean loadExternalBeans)

void reset()

Resets the GrailsRumtimeConfigurator.

void setApplicationContext(ApplicationContext applicationContext)

void setLoadExternalPersistenceConfig(boolean b)

void setPluginManager(GrailsPluginManager manager)

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Field Detail

BEAN_ID

public static final java.lang.String BEAN_ID


CLASS_EDITOR_BEAN

public static final java.lang.String CLASS_EDITOR_BEAN


CLASS_LOADER_BEAN

public static final java.lang.String CLASS_LOADER_BEAN


CUSTOM_EDITORS_BEAN

public static final java.lang.String CUSTOM_EDITORS_BEAN


DATA_SOURCE_BEAN

public static final java.lang.String DATA_SOURCE_BEAN


DIALECT_DETECTOR_BEAN

public static final java.lang.String DIALECT_DETECTOR_BEAN


EXCEPTION_HANDLER_BEAN

public static final java.lang.String EXCEPTION_HANDLER_BEAN


GRAILS_URL_MAPPINGS

public static final java.lang.String GRAILS_URL_MAPPINGS


HIBERNATE_PROPERTIES_BEAN

public static final java.lang.String HIBERNATE_PROPERTIES_BEAN


MESSAGE_SOURCE_BEAN

public static final java.lang.String MESSAGE_SOURCE_BEAN


MULTIPART_RESOLVER_BEAN

public static final java.lang.String MULTIPART_RESOLVER_BEAN


OPEN_SESSION_IN_VIEW_INTERCEPTOR_BEAN

public static final java.lang.String OPEN_SESSION_IN_VIEW_INTERCEPTOR_BEAN


SESSION_FACTORY_BEAN

public static final java.lang.String SESSION_FACTORY_BEAN


SPRING_RESOURCES_CLASS

public static final java.lang.String SPRING_RESOURCES_CLASS


SPRING_RESOURCES_GROOVY

public static final java.lang.String SPRING_RESOURCES_GROOVY


SPRING_RESOURCES_XML

public static final java.lang.String SPRING_RESOURCES_XML


TRANSACTION_MANAGER_BEAN

public static final java.lang.String TRANSACTION_MANAGER_BEAN


 
Constructor Detail

GrailsRuntimeConfigurator

public GrailsRuntimeConfigurator(GrailsApplication application)


GrailsRuntimeConfigurator

public GrailsRuntimeConfigurator(GrailsApplication application, ApplicationContext parent)


 
Method Detail

configure

public WebApplicationContext configure()
GrailsPlugin.groovy", application); PluginManagerHolder.setPluginManager(pluginManager); } else { LOG.debug("Retrieved thread-bound PluginManager instance"); pluginManager.setApplication(application); } } /** Configures the Grails application context at runtime.
Returns:
A WebApplicationContext instance


configure

public WebApplicationContext configure(ServletContext context)
Configures the Grails application context at runtime
Parameters:
context - A ServletContext instance
Returns:
An ApplicationContext instance


configure

public WebApplicationContext configure(ServletContext context, boolean loadExternalBeans)


configureDomainOnly

public WebApplicationContext configureDomainOnly()


createWebRuntimeSpringConfiguration

protected WebRuntimeSpringConfiguration createWebRuntimeSpringConfiguration(@SuppressWarnings("unused") GrailsApplication app, ApplicationContext parentCtx, java.lang.ClassLoader classLoader)


getPluginManager

public GrailsPluginManager getPluginManager()


loadExternalSpringConfig

public static void loadExternalSpringConfig(RuntimeSpringConfiguration config, GrailsApplication application)
Loads any external Spring configuration into the given RuntimeSpringConfiguration object.
Parameters:
config - The config instance
classLoader - The class loader


loadSpringGroovyResources

public static void loadSpringGroovyResources(RuntimeSpringConfiguration config, GrailsApplication application)


loadSpringGroovyResourcesIntoContext

public static void loadSpringGroovyResourcesIntoContext(RuntimeSpringConfiguration config, GrailsApplication application, GenericApplicationContext context)


reconfigure

public void reconfigure(GrailsApplicationContext current, @SuppressWarnings("unused") ServletContext servletContext, boolean loadExternalBeans)


reset

public void reset()
Resets the GrailsRumtimeConfigurator.


setApplicationContext

public void setApplicationContext(ApplicationContext applicationContext)


setLoadExternalPersistenceConfig

public void setLoadExternalPersistenceConfig(@SuppressWarnings("unused") boolean b)


setPluginManager

public void setPluginManager(GrailsPluginManager manager)


 

Groovy Documentation