Class OsgiPropertyUtils
java.lang.Object
com.ibm.wsspi.kernel.service.utils.OsgiPropertyUtils
Attempt to retrieve properties using the bundle context of the bundle
that loaded this utility class.
BundleContext.getProperty does
not check any values that are bundle-specific: it first checks
the list of properties used to start the framework, and then checks
system properties to retrieve the property value.- See Also:
-
FrameworkUtil.getBundle(Class)BundleContext.getProperty(String)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleangetBoolean(String propertyName) Retrieve the value of the specified property from framework/system properties.static intgetInteger(String propertyName, int defaultValue) Retrieve the value of the specified property from framework/system properties.static longRetrieve the value of the specified property from framework/system properties.static StringgetProperty(String propertyName, String defaultValue) Retrieve the value of the specified property from framework/system properties.
-
Constructor Details
-
OsgiPropertyUtils
public OsgiPropertyUtils()
-
-
Method Details
-
getProperty
Retrieve the value of the specified property from framework/system properties.- Parameters:
propertyName- Name of propertydefaultValue- Default value to return if property is not set- Returns:
- Property or default value as a String
-
getInteger
Retrieve the value of the specified property from framework/system properties. Value is converted and returned as an int.- Parameters:
propertyName- Name of propertydefaultValue- Default value to return if property is not set- Returns:
- Property or default value as an int
-
getLong
Retrieve the value of the specified property from framework/system properties. Value is converted and returned as an long.- Parameters:
propertyName- Name of propertydefaultValue- Default value to return if property is not set- Returns:
- Property or default value as an long
-
getBoolean
Retrieve the value of the specified property from framework/system properties. Value is converted and returned as an boolean.- Parameters:
propertyName- Name of propertydefaultValue- Default value to return if property is not set- Returns:
- Property or default value as an boolean
-