/** * Retrieves the set of referral URLs for this LDAP exception. * * @return The set of referral URLs for this LDAP exception, or an empty * array if there are none. */ public String[] getReferralURLs() { return ldapException.getReferralURLs(); }
/** * Retrieves the set of referral URLs for this LDAP exception. * * @return The set of referral URLs for this LDAP exception, or an empty * array if there are none. */ public String[] getReferralURLs() { return ldapException.getReferralURLs(); }
/** * Creates a new LDAP referral exception from the provided * {@link com.unboundid.ldap.sdk.LDAPException} object. * * @param ldapException The {@code LDAPException} object to use for this * LDAP interrupted exception. */ public LDAPReferralException( final com.unboundid.ldap.sdk.LDAPException ldapException) { super(ldapException); referralURLs = ldapException.getReferralURLs(); }
/** * Ensures that the provided LDAP exception does not have any referral URLs. * * @param exception The LDAP exception to examine. * * @throws AssertionError If the provided exception has one or more referral * URLs. */ public static void assertMissingReferral(final LDAPException exception) throws AssertionError { final String[] referralURLs = exception.getReferralURLs(); if ((referralURLs != null) && (referralURLs.length > 0)) { throw new AssertionError(ERR_TEST_RESULT_HAS_REFERRAL.get( StaticUtils.getExceptionMessage(exception))); } }
/** * Ensures that the provided LDAP exception has one or more referral URLs. * * @param exception The LDAP exception to examine. * * @throws AssertionError If the provided exception does not have any * referral URLs. */ public static void assertHasReferral(final LDAPException exception) throws AssertionError { final String[] referralURLs = exception.getReferralURLs(); if ((referralURLs == null) || (referralURLs.length == 0)) { throw new AssertionError(ERR_TEST_RESULT_MISSING_REFERRAL.get( StaticUtils.getExceptionMessage(exception))); } }
/** * 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 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 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(); }
new ExtendedResponseProtocolOp(le.getResultCode().intValue(), le.getMatchedDN(), le.getMessage(), Arrays.asList(le.getReferralURLs()), null, null); return new LDAPMessage(messageID, extendedResponseProtocolOp, Arrays.asList(le.getResponseControls()));
new SearchResultDoneProtocolOp(le.getResultCode().intValue(), le.getMatchedDN(), le.getDiagnosticMessage(), StaticUtils.toList(le.getReferralURLs())), le.getResponseControls()); 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.getMessage(), le.getMatchedDN(), le.getReferralURLs(), le.getResponseControls()); le.getMessage(), le.getMatchedDN(), le.getReferralURLs(), le.getResponseControls()); le.getMessage(), le.getMatchedDN(), le.getReferralURLs(), le.getResponseControls());
new ExtendedResponseProtocolOp(le.getResultCode().intValue(), le.getMatchedDN(), le.getDiagnosticMessage(), StaticUtils.toList(le.getReferralURLs()), null, null), le.getResponseControls());
if (le.getReferralURLs() != null) for (final String url : le.getReferralURLs())
le.getDiagnosticMessage(), le.getMatchedDN(), le.getReferralURLs(), null, null, le.getResponseControls());
le.getDiagnosticMessage(), le.getMatchedDN(), le.getReferralURLs(), null, null, null);