public final class FilterEncoder extends Object
| Modifier | Constructor and Description |
|---|---|
private |
FilterEncoder() |
| Modifier and Type | Method and Description |
|---|---|
static String |
encodeFilterValue(String value)
Handles encoding of special characters in LDAP search filter assertion values using the
<valueencoding> rule as described in RFC 4515.
|
static String |
format(String filterTemplate,
String... values)
Formats a filter and handles encoding of special characters in the value arguments using the
<valueencoding> rule as described in RFC 4515.
|
public static String format(String filterTemplate, String... values)
Example of filter template format: (&(cn={0})(uid={1}))
filterTemplate - the filter with placeholdersvalues - the values to encode and substituteIllegalArgumentException - if the number of values does not match the number of placeholders in the templatepublic static String encodeFilterValue(String value)
value - Right hand side of "attrId=value" assertion occurring in an LDAP search filter.valueCopyright © 2003–2022 The Apache Software Foundation. All rights reserved.