public class LDAPExceptionUtils extends Object
Modifier and Type | Method and Description |
---|---|
static void |
ensureSuccess(com.unboundid.ldap.sdk.LDAPResult result)
Throws a JSON-RPC 2.0 error with corresponding code and message if
the specified LDAP result indicates failure.
|
static com.thetransactioncompany.jsonrpc2.JSONRPC2Error |
toJSONRPC2Error(com.unboundid.ldap.sdk.LDAPException ldapException)
Turns an LDAP exception into a JSON-RPC 2.0 error with corresponding
code and message.
|
public static com.thetransactioncompany.jsonrpc2.JSONRPC2Error toJSONRPC2Error(com.unboundid.ldap.sdk.LDAPException ldapException)
ldapException
- A valid LDAP exception instance. Must not be
null
.public static void ensureSuccess(com.unboundid.ldap.sdk.LDAPResult result) throws com.thetransactioncompany.jsonrpc2.JSONRPC2Error
result
- The result from an LDAP request. Must not be
null
.com.thetransactioncompany.jsonrpc2.JSONRPC2Error
- On an LDAP result indicating a failure.Copyright © 2015 Connect2id. All Rights Reserved.