public interface Filter
Filter
s can be created by calling
BundleContext.createFilter(java.lang.String)
or FrameworkUtil.createFilter(java.lang.String)
with
a filter string.
A Filter
can be used numerous times to determine if the match
argument matches the filter string that was used to create the
Filter
.
Some examples of LDAP filters are:
"(cn=Babs Jensen)" "(!(cn=Tim Howes))" "(&(" + Constants.OBJECTCLASS + "=Person)(|(sn=Jensen)(cn=Babs J*)))" "(o=univ*of*mich*)"
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Compares this
Filter to another Filter . |
int |
hashCode()
Returns the hashCode for this
Filter . |
boolean |
match(Dictionary dictionary)
Filter using a
Dictionary . |
boolean |
match(ServiceReference reference)
Filter using a service's properties.
|
boolean |
matchCase(Dictionary dictionary)
Filter with case sensitivity using a
Dictionary . |
String |
toString()
Returns this
Filter 's filter string. |
boolean match(ServiceReference reference)
This Filter
is executed using the keys and values of the
referenced service's properties. The keys are case insensitively matched
with this Filter
.
reference
- The reference to the service whose properties are used
in the match.true
if the service's properties match this
Filter
; false
otherwise.boolean match(Dictionary dictionary)
Dictionary
. This Filter
is
executed using the specified Dictionary
's keys and values.
The keys are case insensitively matched with this Filter
.dictionary
- The Dictionary
whose keys are used in the
match.true
if the Dictionary
's keys and
values match this filter; false
otherwise.IllegalArgumentException
- If dictionary
contains case
variants of the same key name.String toString()
Filter
's filter string.
The filter string is normalized by removing whitespace which does not affect the meaning of the filter.
boolean equals(Object obj)
Filter
to another Filter
.
This method returns the result of calling
this.toString().equals(obj.toString())
.
int hashCode()
Filter
.
This method returns the result of calling
this.toString().hashCode()
.
boolean matchCase(Dictionary dictionary)
Dictionary
. This
Filter
is executed using the specified
Dictionary
's keys and values. The keys are case sensitively
matched with this Filter
.dictionary
- The Dictionary
whose keys are used in the
match.true
if the Dictionary
's keys and
values match this filter; false
otherwise.Copyright © 2012 JBoss by Red Hat. All Rights Reserved.