Groovy Documentation

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

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

public class GrailsRuntimeConfigurator
extends java.lang.Object

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_INITIALIZING

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, org.springframework.context.ApplicationContext parent)

 
Method Summary
org.springframework.web.context.WebApplicationContext configure()

GrailsPlugin.groovy", application); } PluginManagerHolder.setPluginManager(pluginManager); }

org.springframework.web.context.WebApplicationContext configure(javax.servlet.ServletContext context)

Configures the Grails application context at runtime

org.springframework.web.context.WebApplicationContext configure(javax.servlet.ServletContext context, boolean loadExternalBeans)

org.springframework.web.context.WebApplicationContext configureDomainOnly()

protected WebRuntimeSpringConfiguration createWebRuntimeSpringConfiguration(GrailsApplication app, org.springframework.context.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, org.springframework.context.support.GenericApplicationContext context)

void reconfigure(GrailsApplicationContext current, javax.servlet.ServletContext servletContext, boolean loadExternalBeans)

static BeanBuilder reloadSpringResourcesConfig(RuntimeSpringConfiguration config, GrailsApplication application, java.lang.Class groovySpringResourcesClass)

static void reset()

Resets the GrailsRumtimeConfigurator.

void setApplicationContext(org.springframework.context.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_INITIALIZING

public static final java.lang.String GRAILS_INITIALIZING


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, org.springframework.context.ApplicationContext parent)


 
Method Detail

configure

public org.springframework.web.context.WebApplicationContext configure()
GrailsPlugin.groovy", application); } PluginManagerHolder.setPluginManager(pluginManager); } /** Configures the Grails application context at runtime.
Returns:
A WebApplicationContext instance


configure

public org.springframework.web.context.WebApplicationContext configure(javax.servlet.ServletContext context)
Configures the Grails application context at runtime
Parameters:
context - A ServletContext instance
Returns:
An ApplicationContext instance


configure

public org.springframework.web.context.WebApplicationContext configure(javax.servlet.ServletContext context, boolean loadExternalBeans)


configureDomainOnly

public org.springframework.web.context.WebApplicationContext configureDomainOnly()


createWebRuntimeSpringConfiguration

protected WebRuntimeSpringConfiguration createWebRuntimeSpringConfiguration(@SuppressWarnings("unused") GrailsApplication app, org.springframework.context.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


loadSpringGroovyResources

public static void loadSpringGroovyResources(RuntimeSpringConfiguration config, GrailsApplication application)


loadSpringGroovyResourcesIntoContext

public static void loadSpringGroovyResourcesIntoContext(RuntimeSpringConfiguration config, GrailsApplication application, org.springframework.context.support.GenericApplicationContext context)


reconfigure

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


reloadSpringResourcesConfig

public static BeanBuilder reloadSpringResourcesConfig(RuntimeSpringConfiguration config, GrailsApplication application, java.lang.Class groovySpringResourcesClass)


reset

public static void reset()
Resets the GrailsRumtimeConfigurator.


setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)


setLoadExternalPersistenceConfig

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


setPluginManager

public void setPluginManager(GrailsPluginManager manager)


 

Groovy Documentation