org.ops4j.pax.runner
Class ConfigurationImpl

java.lang.Object
  extended by org.ops4j.pax.runner.ConfigurationImpl
All Implemented Interfaces:
Configuration

public class ConfigurationImpl
extends java.lang.Object
implements Configuration

Configuration implementation that reads properties from a properties file.

Since:
August 26, 2007
Author:
Alin Dreghiciu

Constructor Summary
ConfigurationImpl(java.lang.String url)
          Creates the configuration by reading propertiesfrom an url.
 
Method Summary
 java.lang.String getProperty(java.lang.String key)
          Returns a property from configuration by key.
 java.lang.String[] getPropertyNames(java.lang.String regex)
          {&inheritDoc}
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationImpl

public ConfigurationImpl(java.lang.String url)
Creates the configuration by reading propertiesfrom an url. The url can start with classpath: and then the classpath is searched for the resource after ":".

Parameters:
url - url to load properties from
Method Detail

getProperty

public java.lang.String getProperty(java.lang.String key)
Returns a property from configuration by key.

Specified by:
getProperty in interface Configuration
Parameters:
key - key of the property
Returns:
value of property

getPropertyNames

public java.lang.String[] getPropertyNames(java.lang.String regex)
{&inheritDoc}

Specified by:
getPropertyNames in interface Configuration
Parameters:
regex - regular expresion to match
Returns:
all properties that match.


Copyright © 2006-2011 OPS4J - Open Participation Software for Java. All Rights Reserved.