/** * Logs the configuration details at INFO level. */ @Override public void log() { Logger log = LogManager.getLogger(LOG_CATEGORY); if (dn.equals(DN.NULL_DN)) log.info("[CM1050] Directory user DN: [anonymous]"); else log.info("[CM1050] Directory user DN: {}", dn); } }
/** * Returns the authzId string representation of the specified * distinguished name (DN). * * @param dn The distinguished name (DN). Must not be {@code null}. * * @return The authzId string. */ private static String toAuthzIdString(final DN dn) { if (dn == null) throw new IllegalArgumentException("The authzId DN must not be null"); if (dn.equals(DN.NULL_DN)) return "dn:"; else return "dn:" + dn.toNormalizedString(); }
/** * Indicates whether the DN with the provided string representation is equal * to this DN. * * @param s The string representation of the DN to compare with this DN. * * @return {@code true} if the DN with the provided string representation is * equal to this DN, or {@code false} if not. * * @throws LDAPException If the provided string cannot be parsed as a DN. */ public boolean equals(final String s) throws LDAPException { if (s == null) { return false; } return equals(new DN(s)); }
/** * Indicates whether the DN with the provided string representation is equal * to this DN. * * @param s The string representation of the DN to compare with this DN. * * @return {@code true} if the DN with the provided string representation is * equal to this DN, or {@code false} if not. * * @throws LDAPException If the provided string cannot be parsed as a DN. */ public boolean equals(final String s) throws LDAPException { if (s == null) { return false; } return equals(new DN(s)); }
/** * Indicates whether the provided strings represent the same distinguished * name. * * @param dn1 The first DN to be compared. * @param dn2 The second DN to be compared. * * @return {@code true} if the provided strings represent the same * distinguished name, or {@code false} if not or if either of the * values cannot be parsed as a valid DN. */ public static boolean equals(final String dn1, final String dn2) { try { return DN.equals(dn1, dn2); } catch (Exception e) { debugException(e); return false; } } }
/** * Indicates whether the two provided strings represent the same DN. * * @param s1 The string representation of the first DN for which to make the * determination. It must not be {@code null}. * @param s2 The string representation of the second DN for which to make * the determination. It must not be {@code null}. * * @return {@code true} if the provided strings represent the same DN, or * {@code false} if not. * * @throws LDAPException If either of the provided strings cannot be parsed * as a DN. */ public static boolean equals(final String s1, final String s2) throws LDAPException { return new DN(s1).equals(new DN(s2)); }
/** * Indicates whether the two provided strings represent the same DN. * * @param s1 The string representation of the first DN for which to make the * determination. It must not be {@code null}. * @param s2 The string representation of the second DN for which to make * the determination. It must not be {@code null}. * * @return {@code true} if the provided strings represent the same DN, or * {@code false} if not. * * @throws LDAPException If either of the provided strings cannot be parsed * as a DN. */ public static boolean equals(final String s1, final String s2) throws LDAPException { return new DN(s1).equals(new DN(s2)); }
for (final SearchResultEntry e : searchEntries) if (parsedDN.equals(e.getParsedDN()))
else if (dn.equals(subschemaSubentryDN))
for (final SearchResultEntry e : searchEntries) if (parsedDN.equals(e.getParsedDN()))
if (! foundDN.equals(expectedDN))
if (! dn1.equals(dn2))
return getParsedDN().equals(r.getParsedDN());
if (e.getParsedDN().equals(parsedDN))
return getParsedDN().equals(r.getParsedDN());
if (! foundDN.equals(expectedDN))
return dn1.equals(dn2);
return dn1.equals(dn2);