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 java.lang.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(java.lang.String resource)
          Access a Properties-based Configuration.
 
Method Summary
 java.util.Properties getProperties()
          Retrieve a properties file, opening it if necessary.
 java.lang.String getProperty(java.lang.String property)
          Get value of property.
 java.util.Set<java.lang.String> keySet()
          return the set of keys
 java.lang.String setProperty(java.lang.String property, java.lang.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(java.lang.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 java.util.Properties getProperties()
Retrieve a properties file, opening it if necessary.

Returns:
properties
Since:
1.2.1

getProperty

public java.lang.String getProperty(java.lang.String property)
                             throws java.lang.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:
java.lang.IllegalArgumentException - if property is null.
Since:
1.2.1
See Also:
Configuration.getProperty(String)

setProperty

public java.lang.String setProperty(java.lang.String property,
                                    java.lang.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 java.util.Set<java.lang.String> keySet()
return the set of keys

Returns:
the keys