/** * Retrieves the result code for this LDAP response. * * @return The result code for this LDAP response. */ public int getResultCode() { return ldapResult.getResultCode().intValue(); }
/** * 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 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 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 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())); }
/** * Processes the provided delete request. * * @param deleteRequest The delete request to be processed. It must not be * {@code null}. * * @return The result of processing the delete operation. * * @throws LDAPException If the server rejects the delete request, or if a * problem is encountered while sending the request or * reading the response. */ public LDAPResult delete(final DeleteRequest deleteRequest) throws LDAPException { ensureNotNull(deleteRequest); final LDAPResult ldapResult = deleteRequest.process(this, 1); switch (ldapResult.getResultCode().intValue()) { case ResultCode.SUCCESS_INT_VALUE: case ResultCode.NO_OPERATION_INT_VALUE: return ldapResult; default: throw new LDAPException(ldapResult); } }
/** * 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; }
/** * Processes the provided compare request. * * @param compareRequest The compare request to be processed. It must not * be {@code null}. * * @return The result of processing the compare operation. * * @throws LDAPException If the server rejects the compare request, or if a * problem is encountered while sending the request or * reading the response. */ public CompareResult compare(final CompareRequest compareRequest) throws LDAPException { ensureNotNull(compareRequest); final LDAPResult result = compareRequest.process(this, 1); switch (result.getResultCode().intValue()) { case ResultCode.COMPARE_FALSE_INT_VALUE: case ResultCode.COMPARE_TRUE_INT_VALUE: return new CompareResult(result); default: throw new LDAPException(result); } }