org.kuali.common.util.spring
Class SpringUtils

java.lang.Object
  extended by org.kuali.common.util.spring.SpringUtils

public class SpringUtils
extends Object


Constructor Summary
SpringUtils()
           
 
Method Summary
static Properties convert(org.springframework.core.env.EnumerablePropertySource<?> source)
          Convert an EnumerablePropertySource into a Properties object.
static List<Properties> convertEnumerablePropertySources(List<org.springframework.core.env.PropertySource<?>> sources)
          Convert any PropertySources that extend EnumerablePropertySource into Properties object's
static Properties getAllEnumerableProperties(org.springframework.core.env.ConfigurableEnvironment env)
          Examine ConfigurableEnvironment for PropertySource's that extend EnumerablePropertySource and aggregate them into a single Properties object
static String getProperty(org.springframework.core.env.Environment env, String key)
          Get a fully resolved property value from the environment.
static List<org.springframework.core.env.PropertySource<?>> getPropertySources(org.springframework.core.env.ConfigurableEnvironment env)
          Get all PropertySource objects from the environment as a List.
static void reconfigurePropertySources(org.springframework.core.env.ConfigurableEnvironment env, String name, Properties properties)
          Remove any existing property sources and add one property source backed by the properties passed in
static void removeAllPropertySources(org.springframework.core.env.ConfigurableEnvironment env)
          Remove any existing property sources
static void showPropertySources(org.springframework.core.env.ConfigurableEnvironment env)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringUtils

public SpringUtils()
Method Detail

showPropertySources

public static void showPropertySources(org.springframework.core.env.ConfigurableEnvironment env)

getProperty

public static String getProperty(org.springframework.core.env.Environment env,
                                 String key)
Get a fully resolved property value from the environment. If the property is not found or contains unresolvable placeholders an exception is thrown.


getAllEnumerableProperties

public static Properties getAllEnumerableProperties(org.springframework.core.env.ConfigurableEnvironment env)
Examine ConfigurableEnvironment for PropertySource's that extend EnumerablePropertySource and aggregate them into a single Properties object


reconfigurePropertySources

public static void reconfigurePropertySources(org.springframework.core.env.ConfigurableEnvironment env,
                                              String name,
                                              Properties properties)
Remove any existing property sources and add one property source backed by the properties passed in


removeAllPropertySources

public static void removeAllPropertySources(org.springframework.core.env.ConfigurableEnvironment env)
Remove any existing property sources


getPropertySources

public static List<org.springframework.core.env.PropertySource<?>> getPropertySources(org.springframework.core.env.ConfigurableEnvironment env)
Get all PropertySource objects from the environment as a List.


convertEnumerablePropertySources

public static List<Properties> convertEnumerablePropertySources(List<org.springframework.core.env.PropertySource<?>> sources)
Convert any PropertySources that extend EnumerablePropertySource into Properties object's


convert

public static Properties convert(org.springframework.core.env.EnumerablePropertySource<?> source)
Convert an EnumerablePropertySource into a Properties object.



Copyright © 2010-2013 The Kuali Foundation. All Rights Reserved.