|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.osgi.util.OsgiFilterUtils
public abstract class OsgiFilterUtils
Utility class for OSGi filters.
Allows filter creation(as well as modication) using multiple classnames.
Constructor Summary | |
---|---|
OsgiFilterUtils()
|
Method Summary | |
---|---|
static Filter |
createFilter(String filter)
Create an OSGi filter from the given String. |
static boolean |
isValidFilter(String filter)
Validate the given String as a OSGi filter. |
static String |
unifyFilter(Class[] classes,
String filter)
Add the given classes to the given filter. |
static String |
unifyFilter(Class clazz,
String filter)
Add the given class to the given filter. |
static String |
unifyFilter(String[] classes,
String filter)
Add the given classese as an 'and'(&) Constants.OBJECTCLASS
constraint to the given filter. |
static String |
unifyFilter(String clazz,
String filter)
Add 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 nullfilter
- an existing, valid filter
Constants.OBJECTCLASS
constraintpublic static String unifyFilter(Class clazz, String filter)
clazz
- filter
-
unifyFilter(String, String)
public static String unifyFilter(Class[] classes, String filter)
classes
- filter
-
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 classes name - can be null/emptyfilter
- an existing, valid filter
Constants.OBJECTCLASS
constraintpublic static String unifyFilter(String key, String[] items, String filter)
key
- the key under which the items are being concatenateditems
- an array of strings concatenated to the existing filterfilter
- an existing, valid filter
public static boolean isValidFilter(String filter)
filter
- the filter expression
public static Filter createFilter(String filter)
InvalidSyntaxException
checked exception into an unchecked
IllegalArgumentException
.
filter
- filter string representation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |