Groovy Documentation

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

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

@Deprecated
public class ConfigurationHolder
extends java.lang.Object

Holds a reference to the ConfigObject instance.

deprecated:
Use dependency injection instead
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, int), java.lang.Object#wait(long), 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

@Deprecated
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.
deprecated:
Use dependency injection instead
Returns:
The ConfigObject


getFlatConfig

@SuppressWarnings("rawtypes")
@Deprecated
public static java.util.Map getFlatConfig()
Returns the ConfigObject has a flattened map for easy access from Java in a properties file like way.
deprecated:
Use dependency injection instead
Returns:
The flattened ConfigObject


setConfig

@Deprecated
public static void setConfig(groovy.util.ConfigObject newConfig)
Sets the ConfigObject. Synchronized to avoid the flatten() method being called concurrently.
deprecated:
Use dependency injection instead
Parameters:
newConfig


 

Groovy Documentation