The string representation of an LDAP search filter is defined by the following grammar. It uses a prefix format.
<filter> ::= '(' <filtercomp> ')' <filtercomp> ::= <and> | <or> | <not> | <item> <and> ::= '&' <filterlist> <or> ::= '|' <filterlist> <not> ::= '!' <filter> <filterlist> ::= <filter> | <filter> <filterlist> <item> ::= <simple> | <present> | <substring> <simple> ::= <attr> <filtertype> <value> <filtertype> ::= <equal> | <approx> | <greater> | <less> <equal> ::= '=' <approx> ::= '~=' <greater> ::= '>=' <less> ::= '<=' <present> ::= <attr> '=*' <substring> ::= <attr> '=' <initial> <any> <final> <initial> ::= NULL | <value> <any> ::= '*' <starval> <starval> ::= NULL | <value> '*' <starval> <final> ::= NULL | <value>
<attr>
is a string representing an attribute, or key, in the properties objects of the registered services. Attribute names are not case sensitive; that is cn and CN both refer to the same attribute. <value>
is a string representing the value, or part of one, of a key in the properties objects of the registered services. If a <value>
must contain one of the characters ' *
' or '(
' or ')
', these characters should be escaped by preceding them with the backslash ' \
' character. Note that although both the <substring>
and <present>
productions can produce the 'attr=*'
construct, this construct is used only to denote a presence filter. Examples of LDAP filters are:
"(cn=Babs Jensen)" "(!(cn=Tim Howes))" "(&(" + ServiceScope.SERVICE_TYPE + "=service:acs)(|(group=A)(group=B*)))" "(load<0.5)"@param listener - the ServiceListener to add. @param query - the String representation of the LDAP query (can be null) @throws InvalidSyntaxException - if the supplied query contains invalid syntax.
|
|