/** * Retrieves the matched DN for this LDAP exception. * * @return The matched DN for this LDAP exception, or {@code null} if there * is none. */ public String getMatchedDN() { return ldapException.getMatchedDN(); }
/** * Retrieves the matched DN for this LDAP exception. * * @return The matched DN for this LDAP exception, or {@code null} if there * is none. */ public String getMatchedDN() { return ldapException.getMatchedDN(); }
/** * Ensures that the provided LDAP exception does not contain a matched DN * value. * * @param exception The LDAP exception to examine. * * @throws AssertionError If the provided exception contained a matched DN * value. */ public static void assertMissingMatchedDN(final LDAPException exception) throws AssertionError { if (exception.getMatchedDN() != null) { throw new AssertionError(ERR_TEST_RESULT_CONTAINS_MATCHED_DN.get( StaticUtils.getExceptionMessage(exception), exception.getMatchedDN())); } }
/** * Ensures that the provided LDAP exception contains a matched DN value. * * @param exception The LDAP exception to examine. * * @throws AssertionError If the provided exception did not contain a * matched DN value. */ public static void assertContainsMatchedDN(final LDAPException exception) throws AssertionError { if (exception.getMatchedDN() == null) { throw new AssertionError(ERR_TEST_RESULT_MISSING_MATCHED_DN.get( StaticUtils.getExceptionMessage(exception))); } }
throws LDAPException, AssertionError if (exception.getMatchedDN() == null) final DN foundDN = new DN(exception.getMatchedDN()); final DN expectedDN = new DN(matchedDN); if (! foundDN.equals(expectedDN)) exception.getMatchedDN()));
/** * Creates a new LDAP exception from the provided * {@link com.unboundid.ldap.sdk.LDAPException} object. * * @param ldapException The {@code LDAPException} object to use to create * this LDAP exception. */ public LDAPException(final com.unboundid.ldap.sdk.LDAPException ldapException) { this(ldapException.getMessage(), ldapException.getResultCode().intValue(), ldapException.getMessage(), ldapException.getMatchedDN()); }
/** * Creates a new instance of this notice of disconnection extended result from * the provided LDAP exception. * * @param ldapException The LDAP exception to use to create this notice of * disconnection extended result. */ public NoticeOfDisconnectionExtendedResult(final LDAPException ldapException) { this(0, ldapException.getResultCode(), ldapException.getDiagnosticMessage(), ldapException.getMatchedDN(), ldapException.getReferralURLs(), ldapException.getResponseControls()); }
/** * Creates a new instance of this notice of disconnection extended result from * the provided LDAP exception. * * @param ldapException The LDAP exception to use to create this notice of * disconnection extended result. */ public NoticeOfDisconnectionExtendedResult(final LDAPException ldapException) { this(0, ldapException.getResultCode(), ldapException.getDiagnosticMessage(), ldapException.getMatchedDN(), ldapException.getReferralURLs(), ldapException.getResponseControls()); }
/** * Creates a new LDAP search exception from the provided exception. * * @param ldapException The LDAP exception with the information to include * in this LDAP search exception. */ public LDAPSearchException(final LDAPException ldapException) { super(ldapException.getResultCode(), ldapException.getMessage(), ldapException.getMatchedDN(), ldapException.getReferralURLs(), ldapException.getResponseControls(), ldapException); if (ldapException instanceof LDAPSearchException) { final LDAPSearchException lse = (LDAPSearchException) ldapException; searchResult = lse.searchResult; } else { searchResult = new SearchResult(-1, ldapException.getResultCode(), ldapException.getMessage(), ldapException.getMatchedDN(), ldapException.getReferralURLs(), 0, 0, ldapException.getResponseControls()); } }
/** * Creates a new LDAP search exception from the provided exception. * * @param ldapException The LDAP exception with the information to include * in this LDAP search exception. */ public LDAPSearchException(final LDAPException ldapException) { super(ldapException.getResultCode(), ldapException.getMessage(), ldapException.getMatchedDN(), ldapException.getReferralURLs(), ldapException.getResponseControls(), ldapException); if (ldapException instanceof LDAPSearchException) { final LDAPSearchException lse = (LDAPSearchException) ldapException; searchResult = lse.searchResult; } else { searchResult = new SearchResult(-1, ldapException.getResultCode(), ldapException.getMessage(), ldapException.getMatchedDN(), ldapException.getReferralURLs(), 0, 0, ldapException.getResponseControls()); } }
/** * Creates a new LDAP exception using the information contained in the * provided LDAP exception. * * @param e The LDAP exception to use to create this exception. */ public LDAPException(final LDAPException e) { super(e.getMessage(), e.getCause()); resultCode = e.getResultCode(); matchedDN = e.getMatchedDN(); diagnosticMessage = e.getDiagnosticMessage(); referralURLs = e.getReferralURLs(); responseControls = e.getResponseControls(); }
/** * Creates a new LDAP exception using the information contained in the * provided LDAP exception. * * @param e The LDAP exception to use to create this exception. */ public LDAPException(final LDAPException e) { super(e.getMessage(), e.getCause()); resultCode = e.getResultCode(); matchedDN = e.getMatchedDN(); diagnosticMessage = e.getDiagnosticMessage(); referralURLs = e.getReferralURLs(); responseControls = e.getResponseControls(); }
le.getMatchedDN(), le.getMessage(), Arrays.asList(le.getReferralURLs()), null, null); return new LDAPMessage(messageID, extendedResponseProtocolOp,
return new LDAPMessage(messageID, new SearchResultDoneProtocolOp(le.getResultCode().intValue(), le.getMatchedDN(), le.getDiagnosticMessage(), StaticUtils.toList(le.getReferralURLs())), le.getResponseControls()); return new LDAPMessage(messageID, new SearchResultDoneProtocolOp(le.getResultCode().intValue(), le.getMatchedDN(), le.getDiagnosticMessage(), StaticUtils.toList(le.getReferralURLs())), le.getResponseControls());
results.add(new LDAPResult(request.getLastMessageID(), le.getResultCode(), le.getMessage(), le.getMatchedDN(), le.getReferralURLs(), le.getResponseControls()));
results.add(new LDAPResult(request.getLastMessageID(), le.getResultCode(), le.getMessage(), le.getMatchedDN(), le.getReferralURLs(), le.getResponseControls()));
le.getMatchedDN(), le.getDiagnosticMessage(), StaticUtils.toList(le.getReferralURLs()), null, null), le.getResponseControls());
err("Result Code: ", le.getResultCode().intValue(), " (", le.getResultCode().getName(), ')'); if (le.getMatchedDN() != null) err("Matched DN: ", le.getMatchedDN());
le.getDiagnosticMessage(), le.getMatchedDN(), le.getReferralURLs(), null, null, le.getResponseControls());
le.getDiagnosticMessage(), le.getMatchedDN(), le.getReferralURLs(), null, null, null);