org.ops4j.pax.coin.adapter
Class CommonsConfigurationPropertiesAdapter

java.lang.Object
  extended by org.ops4j.pax.coin.adapter.CommonsConfigurationPropertiesAdapter
All Implemented Interfaces:
PropertiesAdapter

public class CommonsConfigurationPropertiesAdapter
extends Object
implements PropertiesAdapter

Loads configuration properties using Apache Commons configuration. TODO implementation

Since:
0.3.0, March 08, 2008
Author:
Alin Dreghiciu

Constructor Summary
CommonsConfigurationPropertiesAdapter(File file)
          Convenience constructor.
CommonsConfigurationPropertiesAdapter(InputStream inputStream)
          Constructor.
CommonsConfigurationPropertiesAdapter(URL url)
          Convenience constructor.
 
Method Summary
 Map<String,Object> getProperties()
          Returns a map of properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommonsConfigurationPropertiesAdapter

public CommonsConfigurationPropertiesAdapter(InputStream inputStream)
Constructor.

Parameters:
inputStream - input stream to load properties from; cannot be null
Throws:
org.ops4j.lang.NullArgumentException - - If input stream is null

CommonsConfigurationPropertiesAdapter

public CommonsConfigurationPropertiesAdapter(File file)
                                      throws FileNotFoundException
Convenience constructor.

Parameters:
file - file containing properties
Throws:
FileNotFoundException - - If file does not exist or an input stream cannot be generated out of it
org.ops4j.lang.NullArgumentException - - If file is null

CommonsConfigurationPropertiesAdapter

public CommonsConfigurationPropertiesAdapter(URL url)
                                      throws IOException
Convenience constructor.

Parameters:
url - url targeting properties
Throws:
IOException - - If an input stream cannot be generated out of the url
org.ops4j.lang.NullArgumentException - - If url is null
Method Detail

getProperties

public Map<String,Object> getProperties()
Description copied from interface: PropertiesAdapter
Returns a map of properties.

Specified by:
getProperties in interface PropertiesAdapter
Returns:
configuration properties
See Also:
PropertiesAdapter.getProperties()


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