/** * Retrieves the error message for this LDAP response, if available. * * @return The error message for this LDAP response, or {@code null} if there * is none. */ public String getErrorMessage() { return ldapResult.getDiagnosticMessage(); }
/** * Creates a new LDAP exception using the information contained in the * provided LDAP result object. * * @param ldapResult The LDAP result object containing the information to * use for this LDAP exception. */ public LDAPException(final LDAPResult ldapResult) { super((ldapResult.getDiagnosticMessage() == null) ? ldapResult.getResultCode().getName() : ldapResult.getDiagnosticMessage()); resultCode = ldapResult.getResultCode(); matchedDN = ldapResult.getMatchedDN(); diagnosticMessage = ldapResult.getDiagnosticMessage(); referralURLs = ldapResult.getReferralURLs(); responseControls = ldapResult.getResponseControls(); }
/** * Creates a new LDAP exception using the information contained in the * provided LDAP result object. * * @param ldapResult The LDAP result object containing the information to * use for this LDAP exception. * @param cause The underlying exception that triggered this exception. */ public LDAPException(final LDAPResult ldapResult, final Throwable cause) { super(((ldapResult.getDiagnosticMessage() == null) ? ldapResult.getResultCode().getName() : ldapResult.getDiagnosticMessage()), cause); resultCode = ldapResult.getResultCode(); matchedDN = ldapResult.getMatchedDN(); diagnosticMessage = ldapResult.getDiagnosticMessage(); referralURLs = ldapResult.getReferralURLs(); responseControls = ldapResult.getResponseControls(); }
/** * Creates a new LDAP exception using the information contained in the * provided LDAP result object. * * @param ldapResult The LDAP result object containing the information to * use for this LDAP exception. * @param cause The underlying exception that triggered this exception. */ public LDAPException(final LDAPResult ldapResult, final Throwable cause) { super(((ldapResult.getDiagnosticMessage() == null) ? ldapResult.getResultCode().getName() : ldapResult.getDiagnosticMessage()), cause); resultCode = ldapResult.getResultCode(); matchedDN = ldapResult.getMatchedDN(); diagnosticMessage = ldapResult.getDiagnosticMessage(); referralURLs = ldapResult.getReferralURLs(); responseControls = ldapResult.getResponseControls(); }
/** * Creates a new LDAP exception using the information contained in the * provided LDAP result object. * * @param ldapResult The LDAP result object containing the information to * use for this LDAP exception. */ public LDAPException(final LDAPResult ldapResult) { super((ldapResult.getDiagnosticMessage() == null) ? ldapResult.getResultCode().getName() : ldapResult.getDiagnosticMessage()); resultCode = ldapResult.getResultCode(); matchedDN = ldapResult.getMatchedDN(); diagnosticMessage = ldapResult.getDiagnosticMessage(); referralURLs = ldapResult.getReferralURLs(); responseControls = ldapResult.getResponseControls(); }
/** * Creates a new modify DN response protocol op from the provided LDAP result * object. * * @param result The LDAP result object to use to create this protocol op. */ public ModifyDNResponseProtocolOp(final LDAPResult result) { super(LDAPMessage.PROTOCOL_OP_TYPE_MODIFY_DN_RESPONSE, result.getResultCode().intValue(), result.getMatchedDN(), result.getDiagnosticMessage(), StaticUtils.toList(result.getReferralURLs())); }
/** * Creates a new delete response protocol op from the provided LDAP result * object. * * @param result The LDAP result object to use to create this protocol op. */ public DeleteResponseProtocolOp(final LDAPResult result) { super(LDAPMessage.PROTOCOL_OP_TYPE_DELETE_RESPONSE, result.getResultCode().intValue(), result.getMatchedDN(), result.getDiagnosticMessage(), StaticUtils.toList(result.getReferralURLs())); }
/** * Creates a new add response protocol op from the provided LDAP result * object. * * @param result The LDAP result object to use to create this protocol op. */ public AddResponseProtocolOp(final LDAPResult result) { super(LDAPMessage.PROTOCOL_OP_TYPE_ADD_RESPONSE, result.getResultCode().intValue(), result.getMatchedDN(), result.getDiagnosticMessage(), StaticUtils.toList(result.getReferralURLs())); }
/** * Creates a new compare response protocol op from the provided LDAP result * object. * * @param result The LDAP result object to use to create this protocol op. */ public CompareResponseProtocolOp(final LDAPResult result) { super(LDAPMessage.PROTOCOL_OP_TYPE_COMPARE_RESPONSE, result.getResultCode().intValue(), result.getMatchedDN(), result.getDiagnosticMessage(), StaticUtils.toList(result.getReferralURLs())); }
/** * Creates a new modify response protocol op from the provided LDAP result * object. * * @param result The LDAP result object to use to create this protocol op. */ public ModifyResponseProtocolOp(final LDAPResult result) { super(LDAPMessage.PROTOCOL_OP_TYPE_MODIFY_RESPONSE, result.getResultCode().intValue(), result.getMatchedDN(), result.getDiagnosticMessage(), StaticUtils.toList(result.getReferralURLs())); }
/** * Creates a new modify response protocol op from the provided LDAP result * object. * * @param result The LDAP result object to use to create this protocol op. */ public ModifyResponseProtocolOp(final LDAPResult result) { super(LDAPMessage.PROTOCOL_OP_TYPE_MODIFY_RESPONSE, result.getResultCode().intValue(), result.getMatchedDN(), result.getDiagnosticMessage(), StaticUtils.toList(result.getReferralURLs())); }
/** * Creates a new search result done protocol op from the provided LDAP result * object. * * @param result The LDAP result object to use to create this protocol op. */ public SearchResultDoneProtocolOp(final LDAPResult result) { super(LDAPMessage.PROTOCOL_OP_TYPE_SEARCH_RESULT_DONE, result.getResultCode().intValue(), result.getMatchedDN(), result.getDiagnosticMessage(), StaticUtils.toList(result.getReferralURLs())); }
/** * Creates a new add response protocol op from the provided LDAP result * object. * * @param result The LDAP result object to use to create this protocol op. */ public AddResponseProtocolOp(final LDAPResult result) { super(LDAPMessage.PROTOCOL_OP_TYPE_ADD_RESPONSE, result.getResultCode().intValue(), result.getMatchedDN(), result.getDiagnosticMessage(), StaticUtils.toList(result.getReferralURLs())); }
/** * Creates a new compare response protocol op from the provided LDAP result * object. * * @param result The LDAP result object to use to create this protocol op. */ public CompareResponseProtocolOp(final LDAPResult result) { super(LDAPMessage.PROTOCOL_OP_TYPE_COMPARE_RESPONSE, result.getResultCode().intValue(), result.getMatchedDN(), result.getDiagnosticMessage(), StaticUtils.toList(result.getReferralURLs())); }
/** * Creates a new modify DN response protocol op from the provided LDAP result * object. * * @param result The LDAP result object to use to create this protocol op. */ public ModifyDNResponseProtocolOp(final LDAPResult result) { super(LDAPMessage.PROTOCOL_OP_TYPE_MODIFY_DN_RESPONSE, result.getResultCode().intValue(), result.getMatchedDN(), result.getDiagnosticMessage(), StaticUtils.toList(result.getReferralURLs())); }
/** * Creates a new delete response protocol op from the provided LDAP result * object. * * @param result The LDAP result object to use to create this protocol op. */ public DeleteResponseProtocolOp(final LDAPResult result) { super(LDAPMessage.PROTOCOL_OP_TYPE_DELETE_RESPONSE, result.getResultCode().intValue(), result.getMatchedDN(), result.getDiagnosticMessage(), StaticUtils.toList(result.getReferralURLs())); }
/** * Creates a new search result done protocol op from the provided LDAP result * object. * * @param result The LDAP result object to use to create this protocol op. */ public SearchResultDoneProtocolOp(final LDAPResult result) { super(LDAPMessage.PROTOCOL_OP_TYPE_SEARCH_RESULT_DONE, result.getResultCode().intValue(), result.getMatchedDN(), result.getDiagnosticMessage(), StaticUtils.toList(result.getReferralURLs())); }
/** * Creates a new get changelog batch extended result with only the generic * LDAP result information and no extended value. * * @param r An LDAP result with general details of the response. It must * not be {@code null}. */ public GetChangelogBatchExtendedResult(final LDAPResult r) { super(r.getMessageID(), r.getResultCode(), r.getDiagnosticMessage(), r.getMatchedDN(), r.getReferralURLs(), null, null, r.getResponseControls()); resumeToken = null; changesAlreadyPurged = false; moreChangesAvailable = false; estimatedChangesRemaining = -1; entryCount = -1; entryList = null; additionalInfo = null; }
/** * Creates a new bind response protocol op from the provided bind result * object. * * @param result The LDAP result object to use to create this protocol op. */ public BindResponseProtocolOp(final LDAPResult result) { resultCode = result.getResultCode().intValue(); matchedDN = result.getMatchedDN(); diagnosticMessage = result.getDiagnosticMessage(); referralURLs = toList(result.getReferralURLs()); if (result instanceof BindResult) { final BindResult br = (BindResult) result; serverSASLCredentials = br.getServerSASLCredentials(); } else { serverSASLCredentials = null; } }
/** * Creates a new extended response protocol op from the provided extended * result object. * * @param result The extended result object to use to create this protocol * op. */ public ExtendedResponseProtocolOp(final LDAPResult result) { resultCode = result.getResultCode().intValue(); matchedDN = result.getMatchedDN(); diagnosticMessage = result.getDiagnosticMessage(); referralURLs = toList(result.getReferralURLs()); if (result instanceof ExtendedResult) { final ExtendedResult r = (ExtendedResult) result; responseOID = r.getOID(); responseValue = r.getValue(); } else { responseOID = null; responseValue = null; } }