|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.gemini.blueprint.util.OsgiFilterUtils
public abstract class OsgiFilterUtils
Utility class for creating OSGi filters. This class allows filter creation and concatenation from common parameters such as class names.
| Constructor Summary | |
|---|---|
OsgiFilterUtils()
|
|
| Method Summary | |
|---|---|
static org.osgi.framework.Filter |
createFilter(String filter)
Creates an OSGi Filter from the given String. |
static String |
getFilter(org.osgi.framework.ServiceReference reference)
Creates a filter (as String) that matches the properties (expect the service id) of service reference. |
static boolean |
isValidFilter(String filter)
Validates the given String as a OSGi filter. |
static String |
unifyFilter(Class<?>[] classes,
String filter)
Adds the given classes to the given filter. |
static String |
unifyFilter(Class<?> clazz,
String filter)
Adds the given class to the given filter. |
static String |
unifyFilter(String[] classes,
String filter)
Adds the given classes as an 'and'(&) Constants.OBJECTCLASS constraint to the given filter. |
static String |
unifyFilter(String clazz,
String filter)
Adds the given class as an 'and'(&) Constants.OBJECTCLASS constraint to the given filter. |
static String |
unifyFilter(String key,
String[] items,
String filter)
Concatenates the given strings with an 'and'(&) constraint under the given key to the given filter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OsgiFilterUtils()
| Method Detail |
|---|
public static String unifyFilter(String clazz,
String filter)
Constants.OBJECTCLASS constraint to the given filter. At least
one parameter must be valid (non-null).
clazz - class name (can be null)filter - valid OSGi filter (can be null)
Constants.OBJECTCLASS constraint and the given filter
public static String unifyFilter(Class<?> clazz,
String filter)
null).
clazz - fully qualified class name (can be null)filter - valid OSGi filter (can be null)
unifyFilter(String, String)
public static String unifyFilter(Class<?>[] classes,
String filter)
null).
classes - array of fully qualified class names (can be null/empty)filter - valid OSGi filter (can be null)
unifyFilter(String[], String)
public static String unifyFilter(String[] classes,
String filter)
Constants.OBJECTCLASS constraint to the given filter. At least
one parameter must be valid (non-null).
classes - array of fully qualified class names (can be null/empty)filter - valid OSGi filter (can be null)
public static String unifyFilter(String key,
String[] items,
String filter)
null).
key - the key under which the items are being concatenated (required)items - an array of strings concatenated to the existing filterfilter - valid OSGi filter (can be null)
public static boolean isValidFilter(String filter)
filter - OSGi filter
public static org.osgi.framework.Filter createFilter(String filter)
Filter from the given String. Translates the InvalidSyntaxException checked
exception into an unchecked IllegalArgumentException.
filter - OSGi filter given as a String
Filter)public static String getFilter(org.osgi.framework.ServiceReference reference)
reference -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||