public class OsgiUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static Filter |
getFilter(java.lang.Class<?> clazz,
java.util.Map<java.lang.String,java.lang.String> attributes)
Create a
Filter using the passed Class as an objectClass and the map
as the filter attributes. |
static java.lang.String |
lookup(BundleContext context,
java.lang.String name)
Looks a property up by name in the set of framework properties.
|
static java.lang.String |
lookup(ComponentContext context,
java.lang.String name)
Looks a property up by name in a component context.
|
static java.lang.String |
lookupConfigurationThenFramework(ComponentContext context,
java.lang.String name)
Looks a property up by name in the component context first, falling back
in the framework properties if not found.
|
static java.lang.String |
lookupConfigurationThenFramework(ComponentContext context,
java.lang.String nameInComponent,
java.lang.String nameInFramework)
Looks a property up by name in the component context first, falling back
in the framework properties if not found.
|
static java.lang.String |
lookupFrameworkThenConfiguration(ComponentContext context,
java.lang.String name)
Looks a property up by name in the framework properties first, falling
back to the component context if not not found.
|
static java.lang.String |
lookupFrameworkThenConfiguration(ComponentContext context,
java.lang.String nameInComponent,
java.lang.String nameInFramework)
Looks a property up by name in the framework properties first, falling
back to the component context if not not found.
|
public static java.lang.String lookup(ComponentContext context, java.lang.String name)
null
if the property is not found or if the property is found but it is an
empty string.context
- Component context.name
- Name of the property.null
.public static java.lang.String lookup(BundleContext context, java.lang.String name)
null
if the property is not found or if the property is found but
it is an empty string.context
- Bundle context.name
- Name of the property.null
.public static java.lang.String lookupConfigurationThenFramework(ComponentContext context, java.lang.String name)
null
if the
property is not found or if the property is found but it is an empty
string.context
- Component context.name
- Name of the property.null
.public static java.lang.String lookupConfigurationThenFramework(ComponentContext context, java.lang.String nameInComponent, java.lang.String nameInFramework)
null
if the
property is not found or if the property is found but it is an empty
string.context
- Component context.nameInComponent
- Name of the property in the component context.nameInFramework
- Name of the property in the framework properties.null
.public static java.lang.String lookupFrameworkThenConfiguration(ComponentContext context, java.lang.String name)
null
if
the property is not found or if the property is found but it is an empty
string.context
- Component context.name
- Name of the property.null
.public static java.lang.String lookupFrameworkThenConfiguration(ComponentContext context, java.lang.String nameInComponent, java.lang.String nameInFramework)
null
if
the property is not found or if the property is found but it is an empty
string.context
- Component context.nameInComponent
- Name of the property in the component context.nameInFramework
- Name of the property in the framework properties.null
.public static Filter getFilter(java.lang.Class<?> clazz, java.util.Map<java.lang.String,java.lang.String> attributes)
Filter
using the passed Class as an objectClass and the map
as the filter attributes.clazz
- the target objectClassattributes
- target attributes (null value for the absence)Copyright © 2010 - 2020 Adobe. All Rights Reserved