com.ibm.wsspi.kernel.service.utils

Class OsgiPropertyUtils

  1. java.lang.Object
  2. extended bycom.ibm.wsspi.kernel.service.utils.OsgiPropertyUtils

  1. public class OsgiPropertyUtils
  2. extends java.lang.Object
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

Constructor and Description
OsgiPropertyUtils()

Method Summary

Modifier and Type Method and Description
  1. static
  2. boolean
getBoolean(java.lang.String propertyName)
Retrieve the value of the specified property from framework/system properties.
  1. static
  2. int
getInteger(java.lang.String propertyName,int defaultValue)
Retrieve the value of the specified property from framework/system properties.
  1. static
  2. long
getLong(java.lang.String propertyName,long defaultValue)
Retrieve the value of the specified property from framework/system properties.
  1. static
  2. java.lang.String
getProperty(java.lang.String propertyName,java.lang.String defaultValue)
Retrieve the value of the specified property from framework/system properties.
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

OsgiPropertyUtils

  1. public OsgiPropertyUtils()

Method Detail

getProperty

  1. public static java.lang.String getProperty( java.lang.String propertyName,
  2. java.lang.String defaultValue)
Retrieve the value of the specified property from framework/system properties.
Parameters:
propertyName - Name of property
defaultValue - Default value to return if property is not set
Returns:
Property or default value as a String

getInteger

  1. public static int getInteger(java.lang.String propertyName,
  2. int defaultValue)
Retrieve the value of the specified property from framework/system properties. Value is converted and returned as an int.
Parameters:
propertyName - Name of property
defaultValue - Default value to return if property is not set
Returns:
Property or default value as an int

getLong

  1. public static long getLong(java.lang.String propertyName,
  2. long defaultValue)
Retrieve the value of the specified property from framework/system properties. Value is converted and returned as an long.
Parameters:
propertyName - Name of property
defaultValue - Default value to return if property is not set
Returns:
Property or default value as an long

getBoolean

  1. public static boolean getBoolean( java.lang.String propertyName)
Retrieve the value of the specified property from framework/system properties. Value is converted and returned as an boolean.
Parameters:
propertyName - Name of property
Returns:
Property or default value as an boolean