Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.grails.commons.spring
Class GrailsRuntimeConfigurator

    java.lang.Object
      org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator

All Implemented Interfaces:
  ApplicationContextAware

    public class GrailsRuntimeConfigurator

extends Object
implements ApplicationContextAware

A class that handles the runtime configuration of the Grails ApplicationContext

Since:
  0.3
Author:
  Graeme Rocher

Field Summary
`static String` | `BEAN_ID`
`static String` | `CLASS_EDITOR_BEAN`
`static String` | `CLASS_LOADER_BEAN`
`static String` | `CUSTOM_EDITORS_BEAN`
`static String` | `DATA_SOURCE_BEAN`
`static String` | `DIALECT_DETECTOR_BEAN`
`static String` | `EXCEPTION_HANDLER_BEAN`
`static String` | `GRAILS_URL_MAPPINGS`
`static String` | `HIBERNATE_PROPERTIES_BEAN`
`static String` | `MESSAGE_SOURCE_BEAN`
`static String` | `MULTIPART_RESOLVER_BEAN`
`static String` | `OPEN_SESSION_IN_VIEW_INTERCEPTOR_BEAN`
`static String` | `SESSION_FACTORY_BEAN`
`static String` | `SPRING_RESOURCES_CLASS`
`static String` | `SPRING_RESOURCES_GROOVY`
`static String` | `SPRING_RESOURCES_XML`
`static String` | `TRANSACTION_MANAGER_BEAN`

Constructor Summary
`GrailsRuntimeConfigurator(GrailsApplication application)`
`GrailsRuntimeConfigurator(GrailsApplication application, ApplicationContext parent)`

Method Summary
`WebApplicationContext` | `configure()` Configures the Grails application context at runtime
`WebApplicationContext` | `configure(ServletContext context)` Configures the Grails application context at runtime
`WebApplicationContext` | `configure(ServletContext context, boolean loadExternalBeans)`
`WebApplicationContext` | `configureDomainOnly()`
`GrailsPluginManager` | `getPluginManager()`
`static void` | `loadExternalSpringConfig(RuntimeSpringConfiguration config, ClassLoader classLoader)` Loads any external Spring configuration into the given RuntimeSpringConfiguration object
`static void` | `loadSpringGroovyResources(RuntimeSpringConfiguration config, ClassLoader classLoader)`
`static void` | `loadSpringGroovyResourcesIntoContext(RuntimeSpringConfiguration config, ClassLoader classLoader, 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
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### BEAN_ID

    public static final String BEAN_ID

See Also:
  Constant Field Values

### GRAILS_URL_MAPPINGS

    public static final String GRAILS_URL_MAPPINGS

See Also:
  Constant Field Values

### SPRING_RESOURCES_XML

    public static final String SPRING_RESOURCES_XML

See Also:
  Constant Field Values

### SPRING_RESOURCES_GROOVY

    public static final String SPRING_RESOURCES_GROOVY

See Also:
  Constant Field Values

### SPRING_RESOURCES_CLASS

    public static final String SPRING_RESOURCES_CLASS

See Also:
  Constant Field Values

### OPEN_SESSION_IN_VIEW_INTERCEPTOR_BEAN

    public static final String OPEN_SESSION_IN_VIEW_INTERCEPTOR_BEAN

See Also:
  Constant Field Values

### TRANSACTION_MANAGER_BEAN

    public static final String TRANSACTION_MANAGER_BEAN

See Also:
  Constant Field Values

### HIBERNATE_PROPERTIES_BEAN

    public static final String HIBERNATE_PROPERTIES_BEAN

See Also:
  Constant Field Values

### DIALECT_DETECTOR_BEAN

    public static final String DIALECT_DETECTOR_BEAN

See Also:
  Constant Field Values

### SESSION_FACTORY_BEAN

    public static final String SESSION_FACTORY_BEAN

See Also:
  Constant Field Values

### DATA_SOURCE_BEAN

    public static final String DATA_SOURCE_BEAN

See Also:
  Constant Field Values

### MESSAGE_SOURCE_BEAN

    public static final String MESSAGE_SOURCE_BEAN

See Also:
  Constant Field Values

### MULTIPART_RESOLVER_BEAN

    public static final String MULTIPART_RESOLVER_BEAN

See Also:
  Constant Field Values

### EXCEPTION_HANDLER_BEAN

    public static final String EXCEPTION_HANDLER_BEAN

See Also:
  Constant Field Values

### CUSTOM_EDITORS_BEAN

    public static final String CUSTOM_EDITORS_BEAN

See Also:
  Constant Field Values

### CLASS_EDITOR_BEAN

    public static final String CLASS_EDITOR_BEAN

See Also:
  Constant Field Values

### CLASS_LOADER_BEAN

    public static final String CLASS_LOADER_BEAN

See Also:
  Constant Field Values

Constructor Detail

### GrailsRuntimeConfigurator

    public GrailsRuntimeConfigurator(GrailsApplication application)

### GrailsRuntimeConfigurator

    public GrailsRuntimeConfigurator(GrailsApplication application,
                                     ApplicationContext parent)

Method Detail

### configure

    public WebApplicationContext configure()

  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)

### reconfigure

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

### configureDomainOnly

    public WebApplicationContext configureDomainOnly()

### loadExternalSpringConfig

    public static void loadExternalSpringConfig(RuntimeSpringConfiguration config,
                                                ClassLoader classLoader)

  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,
                                                 ClassLoader classLoader)

### loadSpringGroovyResourcesIntoContext

    public static void loadSpringGroovyResourcesIntoContext(RuntimeSpringConfiguration config,
                                                            ClassLoader classLoader,
                                                            GenericApplicationContext context)

### setLoadExternalPersistenceConfig

    public void setLoadExternalPersistenceConfig(boolean b)

### setPluginManager

    public void setPluginManager(GrailsPluginManager manager)

### getPluginManager

    public GrailsPluginManager getPluginManager()

### setApplicationContext

    public void setApplicationContext(ApplicationContext applicationContext)
                               throws BeansException

  Specified by:
    `setApplicationContext` in interface `ApplicationContextAware`
  Throws:
    `BeansException`

### reset

    public void reset()

  Resets the GrailsRumtimeConfigurator

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2005-2009 The Grails project