Package com.netscape.jndi.ldap
Class ProviderUtils
java.lang.Object
com.netscape.jndi.ldap.ProviderUtils
Common utility methods
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static StringattributesToFilter(Attributes attrs) Convert Attribute List to a LDAP filter(package private) static StringescapeBytes(byte[] bytes) (package private) static StringescapeString(String str) Escape a string according to the RFC 2254(package private) static StringexpandFilterExpr(String filterExpr, Object[] filterArgs) Expand filterExpr.(package private) static intjndiSearchScopeToLdap(int jndiScope) static voidTestprivate static voidA method used only for testingprivate static voidA method used only for testing
-
Field Details
-
DEFAULT_FILTER
- See Also:
-
hexDigits
Escape a byte array according to the RFC 2254- See Also:
-
-
Constructor Details
-
ProviderUtils
ProviderUtils()
-
-
Method Details
-
jndiSearchScopeToLdap
- Throws:
NamingException
-
attributesToFilter
Convert Attribute List to a LDAP filter- Parameters:
attrs- An Attribute List- Returns:
- LDAP Filter
- Throws:
NamingException
-
expandFilterExpr
static String expandFilterExpr(String filterExpr, Object[] filterArgs) throws InvalidSearchFilterException Expand filterExpr. Each occurrence of a variable "{n}", where n is a non-negative integer, is replaced with a variable from the filterArgs array indexed by the 'n'. FilterArgs can be Strings or byte[] and they are escaped according to the RFC2254- Throws:
InvalidSearchFilterException
-
escapeString
Escape a string according to the RFC 2254 -
escapeBytes
-
testAttributesToFilter
private static void testAttributesToFilter()A method used only for testing -
testFilterExpr
private static void testFilterExpr()A method used only for testing -
main
Test
-