Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.grails.commons
[Java] Class ConfigurationHolder

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

    public class ConfigurationHolder

Holds a reference to the ConfigObject instance.

Authors:
  Graeme Rocher

Since:
  0.6

Method Summary
`static groovy.util.ConfigObject` | `getConfig()` Retrieve the ConfigObject.
`static java.util.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
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()

Method Detail

### 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

    @SuppressWarnings("rawtypes")
    public static java.util.Map getFlatConfig()

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

### setConfig

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

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

Groovy Documentation