/** * Retrieves the specified entry from the LDAP directory. * * @param dn The Distinguished Name (DN) of the entry to retrieve. Must * not be {@code null}. * * @return The matching directory entry, {@code null} if not found (or * insufficient privileges). */ public ReadOnlyEntry retrieveEntry(final DN dn) { Timer.Context timerCtx = ldapTimers.getTimer.time(); try { return ldapConnPool.getEntry(dn.toString(), SearchRequest.ALL_USER_ATTRIBUTES); } catch (LDAPException e) { throw new PersistenceException("LDAP get of " + dn + " failed: " + e.getResultString(), e); } finally { timerCtx.stop(); } }
/** * Checks that the specified entry exists in the LDAP directory. * * @param dn The Distinguished Name (DN) of the entry to check. Must * not be {@code null}. * * @return {@code true} if the entry exists, {@code false} if not * found (or insufficient privileges). */ public boolean entryExists(final DN dn) { Timer.Context timerCtx = ldapTimers.getTimer.time(); try { return ldapConnPool.getEntry(dn.toString(), SearchRequest.NO_ATTRIBUTES) != null; } catch (LDAPException e) { throw new PersistenceException("LDAP get of " + dn + " failed: " + e.getResultString(), e); } finally { timerCtx.stop(); } }
/** * Retrieves the specified entry from the LDAP directory. * * @param dn The Distinguished Name (DN) of the entry to retrieve. Must * not be {@code null}. * * @return The matching directory entry, {@code null} if not found (or * insufficient privileges). */ public ReadOnlyEntry retrieveEntry(final DN dn) { Timer.Context timerCtx = ldapTimers.getTimer.time(); try { return ldapConnPool.getEntry(dn.toString(), SearchRequest.ALL_USER_ATTRIBUTES); } catch (LDAPException e) { throw new PersistenceException("LDAP get of " + dn + " failed: " + e.getResultString(), e); } finally { timerCtx.stop(); } }
/** * Checks that the specified entry exists in the LDAP directory. * * @param dn The Distinguished Name (DN) of the entry to check. Must * not be {@code null}. * * @return {@code true} if the entry exists, {@code false} if not * found (or insufficient privileges). */ public boolean entryExists(final DN dn) { Timer.Context timerCtx = ldapTimers.getTimer.time(); try { return ldapConnPool.getEntry(dn.toString(), SearchRequest.NO_ATTRIBUTES) != null; } catch (LDAPException e) { throw new PersistenceException("LDAP get of " + dn + " failed: " + e.getResultString(), e); } finally { timerCtx.stop(); } }
return false; throw new PersistenceException("LDAP delete of " + dn + " failed: " + e.getResultString(), e); } finally { timerCtx.stop();
return false; throw new PersistenceException("LDAP delete of " + dn + " failed: " + e.getResultString(), e); } finally { timerCtx.stop();
throw new PersistenceException("LDAP add for " + entry.getDN() + " failed: " + e.getResultString(), e); } finally { timerCtx.stop();
throw new PersistenceException("LDAP add for " + entry.getDN() + " failed: " + e.getResultString(), e); } finally { timerCtx.stop();
throw new PersistenceException("LDAP modify for " + modifyRequest.getDN() + " failed: " + e.getResultString(), e); } finally { timerCtx.stop();
throw new PersistenceException("LDAP modify for " + modifyRequest.getDN() + " failed: " + e.getResultString(), e); } finally { timerCtx.stop();
tool.wrapErr(0, wrapColumn, ERR_INTERACTIVE_LDAP_CANNOT_CONNECT.get(hostname, port, le.getResultString())); if (promptForBoolean( INFO_INTERACTIVE_LDAP_RETRY_PROMPT.get(), true, true)) if (e instanceof LDAPException) msg = ((LDAPException) e).getResultString(); tool.wrapErr(0, wrapColumn, ERR_INTERACTIVE_LDAP_CANNOT_AUTHENTICATE.get( le.getResultString())); if (promptForBoolean( INFO_INTERACTIVE_LDAP_RETRY_PROMPT.get(), true, true))