public final class OsgiConfiguration extends Object
| Constructor and Description | 
|---|
OsgiConfiguration(Map<String,Object> properties)  | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
getAsBoolean(String propertyName,
            boolean defaultValue)
Returns the boolean value of the property or the  
defaultValue if the property is null. | 
double | 
getAsDouble(String propertyName,
           double defaultValue)
Returns the property as a double or the  
defaultValue if the property is null or if the
 property is not a Double and cannot be converted to a Double from the property's string
 value. | 
int | 
getAsInteger(String propertyName,
            int defaultValue)
Returns the property as an integer or the  
defaultValue if the property is null or if
 the property is not an Integer and cannot be converted to an Integer from the
 property's string value. | 
List<String> | 
getAsList(String propertyName)
Returns the property as an array of Strings. 
 | 
List<String> | 
getAsList(String propertyName,
         List<String> defaultValue)
Returns the property as an array of Strings. 
 | 
long | 
getAsLong(String propertyName,
         long defaultValue)
Returns the property as a long or the  
defaultValue if the property is null or if the
 property is not a Long and cannot be converted to a Long from the property's string
 value. | 
String | 
getAsString(String propertyName,
           String defaultValue)
Returns the property as a string or the  
defaultValue if the property is null. | 
Map<String,String> | 
toMap(String propertyName)
Returns the property as a map with string keys and string values. 
 | 
Map<String,String> | 
toMap(String propertyName,
     List<String> defaultValue)
Returns the property as a map with string keys and string values. 
 | 
public Map<String,String> toMap(String propertyName)
The property is considered as a collection whose entries are of the form key=value.
propertyName - configuration property namepublic Map<String,String> toMap(String propertyName, List<String> defaultValue)
The property is considered as a collection whose entries are of the form key=value.
propertyName - configuration property namedefaultValue - default value to convert to map return if property value is nullpublic double getAsDouble(String propertyName, double defaultValue)
defaultValue if the property is null or if the
 property is not a Double and cannot be converted to a Double from the property's string
 value.propertyName - configuration property namedefaultValue - default value to return if property value is nullpublic long getAsLong(String propertyName, long defaultValue)
defaultValue if the property is null or if the
 property is not a Long and cannot be converted to a Long from the property's string
 value.propertyName - configuration property namedefaultValue - default value to return if property value is nullpublic boolean getAsBoolean(String propertyName, boolean defaultValue)
defaultValue if the property is null.
 If the property is not a Boolean it is converted by calling Boolean.valueOf on the
 string value of the object.propertyName - configuration property namedefaultValue - default value to return if property value is nullpublic int getAsInteger(String propertyName, int defaultValue)
defaultValue if the property is null or if
 the property is not an Integer and cannot be converted to an Integer from the
 property's string value.propertyName - configuration property namedefaultValue - default value to return if property value is nullpublic String getAsString(String propertyName, String defaultValue)
defaultValue if the property is null.propertyName - configuration property namedefaultValue - default value to return if property value is nullpublic List<String> getAsList(String propertyName)
null) null is returned.propertyName - configuration property namepublic List<String> getAsList(String propertyName, List<String> defaultValue)
null) the default value is returned.propertyName - configuration property namedefaultValue - default value to return if property is nullCopyright © 2019 ICF Next. All rights reserved.