org.kuali.rice.krad.service.impl
Class ConfigurationServiceImpl

java.lang.Object
  extended by org.kuali.rice.krad.service.impl.ConfigurationServiceImpl
All Implemented Interfaces:
ConfigurationService

public class ConfigurationServiceImpl
extends Object
implements ConfigurationService

Implementation of the ConfigurationService that loads messages from the configured rice resource files and stores them in an internal property holder

Author:
Kuali Rice Team (rice.collab@kuali.org)

Nested Class Summary
protected static class ConfigurationServiceImpl.FilePropertySource
          Used to obtain properties from a properties file
protected static class ConfigurationServiceImpl.PropertyHolder
          This class is a Property container.
protected static interface ConfigurationServiceImpl.PropertySource
          Interface for a source for properties
 
Constructor Summary
ConfigurationServiceImpl()
          Default constructor
 
Method Summary
 Map<String,String> getAllProperties()
          Returns all properties configured for the Rice instance
 boolean getPropertyValueAsBoolean(String key)
          Given a property name (key), returns the "booleanized" value associated with that key.
 String getPropertyValueAsString(String key)
          Given a property name (key), returns the value associated with that key, or null if none is available.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationServiceImpl

public ConfigurationServiceImpl()
Default constructor

Method Detail

getPropertyValueAsString

public String getPropertyValueAsString(String key)
Description copied from interface: ConfigurationService
Given a property name (key), returns the value associated with that key, or null if none is available.

Specified by:
getPropertyValueAsString in interface ConfigurationService
Parameters:
key - - key for the message in application resources
Returns:
String associated with the given key
See Also:
ConfigurationService.getPropertyValueAsString(java.lang.String)

getPropertyValueAsBoolean

public boolean getPropertyValueAsBoolean(String key)
Description copied from interface: ConfigurationService
Given a property name (key), returns the "booleanized" value associated with that key.

true, yes, on, or 1 are translated into true - all other values result in false

Specified by:
getPropertyValueAsBoolean in interface ConfigurationService
Parameters:
key - - key for the message in application resources
Returns:
String associated with the given key
See Also:
ConfigurationService.getPropertyValueAsBoolean(java.lang.String)

getAllProperties

public Map<String,String> getAllProperties()
Description copied from interface: ConfigurationService
Returns all properties configured for the Rice instance

Specified by:
getAllProperties in interface ConfigurationService
Returns:
Properties instance containing all (key,value) pairs known to the service
See Also:
ConfigurationService.getAllProperties()


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.