## org.codehaus.groovy.grails.commons
Class ConfigurationHolder

    java.lang.Object
      org.codehaus.groovy.grails.commons.ConfigurationHolder

    public class ConfigurationHolder

extends Object

A class that holds a reference to the grails.config.ConfigObject instance

Since:
  0.6

  Created: Jun 21, 2007 Time: 3:52:04 PM
Author:
  Graeme Rocher

Constructor Summary
`ConfigurationHolder()`

Method Summary
`static groovy.util.ConfigObject` `getConfig()` Retrieve the ConfigObject.
`static Map` `getFlatConfig()` Returns the ConfigObject has a flattened map for easy access from Java in a properties file like way
`static void` `setConfig(groovy.util.ConfigObject newConfig)` Sets the ConfigObject.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ConfigurationHolder

    public ConfigurationHolder()

Method Detail

### setConfig

    public static void setConfig(groovy.util.ConfigObject newConfig)

  Sets the ConfigObject. Synchronized to avoid the flatten() method being called concurrently

  Parameters:
    `newConfig` -

### getConfig

    public static groovy.util.ConfigObject getConfig()

  Retrieve the ConfigObject. Note unsynchronized access is granted for performance reasons, however typically the ConfigObject is only set on application load or by the plugin scanner during development, so this is not an issue.

  Returns:
    The ConfigObject

### getFlatConfig

    public static Map getFlatConfig()

  Returns the ConfigObject has a flattened map for easy access from Java in a properties file like way

  Returns:
    The flattened ConfigObject

Copyright (c) 2005-2009 The Grails project