public class ConfigurationUtil extends Object
Modifier and Type | Method and Description |
---|---|
static int |
getProperty(org.osgi.framework.BundleContext context,
String name,
int def)
Returns the named property from the framework.
|
static String |
getProperty(org.osgi.framework.BundleContext context,
String name,
String def)
Returns the named property from the framework.
|
static int |
getProperty(Map config,
String name,
int def)
Returns the named property from the configuration.
|
static String |
getProperty(Map config,
String name,
String def)
Returns the named property from the configuration.
|
static String[] |
getStringArrayProperty(Map config,
String name)
Gets a property as String[]
|
public static final String getProperty(org.osgi.framework.BundleContext context, String name, String def)
def
is returned.context
- The BundleContext providing framework propertiesname
- The name of the property to returndef
- The default value if the named property does not existdef
if the property does not existpublic static final int getProperty(org.osgi.framework.BundleContext context, String name, int def)
def
is returned.context
- The BundleContext providing framework propertiesname
- The name of the property to returndef
- The default value if the named property does not existdef
if the property does not existpublic static final String getProperty(Map config, String name, String def)
def
is returned.config
- The properties from which to returned the named onename
- The name of the property to returndef
- The default value if the named property does not existdef
if the property does not existpublic static final int getProperty(Map config, String name, int def)
def
is returned.config
- The properties from which to returned the named onename
- The name of the property to returndef
- The default value if the named property does not existdef
if the property does not existpublic static final String[] getStringArrayProperty(Map config, String name)
config
- The properties from which to returned the named onename
- The name of the property to returnnull
if the property is not set.Copyright © 2006–2020 The Apache Software Foundation. All rights reserved.