edu.internet2.middleware.grouper.cfg
Class PropertiesConfiguration

java.lang.Object
  extended by edu.internet2.middleware.grouper.cfg.PropertiesConfiguration
All Implemented Interfaces:
Configuration

public class PropertiesConfiguration
extends Object
implements Configuration

Access Configuration in a Properties file.

Since:
1.2.1
Version:
$Id: PropertiesConfiguration.java,v 1.11 2009-03-15 06:37:24 mchyzer Exp $
Author:
blair christensen.

Constructor Summary
PropertiesConfiguration(String resource)
          Access a Properties-based Configuration.
 
Method Summary
 Properties getProperties()
          Retrieve a properties file, opening it if necessary.
 String getProperty(String property)
          Get value of property.
 Set<String> keySet()
          return the set of keys
 String setProperty(String property, String value)
          Does not persist value to properties file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesConfiguration

public PropertiesConfiguration(String resource)
Access a Properties-based Configuration.

Parameters:
resource - Resource to use for opening properties file as an InputStream.
Since:
1.2.1
Method Detail

getProperties

public Properties getProperties()
Retrieve a properties file, opening it if necessary.

Returns:
properties
Since:
1.2.1

getProperty

public String getProperty(String property)
                   throws IllegalArgumentException
Description copied from interface: Configuration
Get value of property.

Specified by:
getProperty in interface Configuration
Parameters:
property - Get this property.
Returns:
Value of property or null.
Throws:
IllegalArgumentException - if property is null.
Since:
1.2.1
See Also:
Configuration.getProperty(String)

setProperty

public String setProperty(String property,
                          String value)
Does not persist value to properties file.

Specified by:
setProperty in interface Configuration
Parameters:
property - Set this property.
value - Value to set on this property.
Returns:
New value of property.
Since:
1.2.1
See Also:
Configuration.setProperty(String, String)

keySet

public Set<String> keySet()
return the set of keys

Returns:
the keys