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 java.lang.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(java.io.File file)
          Convenience constructor.
CommonsConfigurationPropertiesAdapter(java.io.InputStream inputStream)
          Constructor.
CommonsConfigurationPropertiesAdapter(java.net.URL url)
          Convenience constructor.
 
Method Summary
 java.util.Map<java.lang.String,java.lang.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(java.io.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(java.io.File file)
                                      throws java.io.FileNotFoundException
Convenience constructor.

Parameters:
file - file containing properties
Throws:
java.io.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(java.net.URL url)
                                      throws java.io.IOException
Convenience constructor.

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

getProperties

public java.util.Map<java.lang.String,java.lang.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 © 2008. All Rights Reserved.