/** * Get the value of the Rdn at the requested index in the supplied Name. * * @param name the Name to work on. * @param index The 0-based index of the rdn value to retrieve. Must be in the range [0,size()). * @return the value of the rdn at the requested index. * @throws IndexOutOfBoundsException if index is outside the specified range. * @since 2.0 */ public static Object getValue(Name name, int index) { Assert.notNull(name, "name must not be null"); LdapName ldapName = returnOrConstructLdapNameFromName(name); Rdn rdn = ldapName.getRdn(index); if(rdn.size() > 1) { LOGGER.warn("Rdn at position " + index + " of dn '" + name + "' is multi-value - returned value is not to be trusted. " + "Consider using name-based getValue method instead"); } return rdn.getValue(); }
/** * Get the value of the Rdn at the requested index in the supplied Name. * * @param name the Name to work on. * @param index The 0-based index of the rdn value to retrieve. Must be in the range [0,size()). * @return the value of the rdn at the requested index. * @throws IndexOutOfBoundsException if index is outside the specified range. * @since 2.0 */ public static Object getValue(Name name, int index) { Assert.notNull(name, "name must not be null"); LdapName ldapName = returnOrConstructLdapNameFromName(name); Rdn rdn = ldapName.getRdn(index); if(rdn.size() > 1) { LOGGER.warn("Rdn at position " + index + " of dn '" + name + "' is multi-value - returned value is not to be trusted. " + "Consider using name-based getValue method instead"); } return rdn.getValue(); }
/** * Get the value of the Rdn at the requested index in the supplied Name. * * @param name the Name to work on. * @param index The 0-based index of the rdn value to retrieve. Must be in the range [0,size()). * @return the value of the rdn at the requested index. * @throws IndexOutOfBoundsException if index is outside the specified range. * @since 2.0 */ public static Object getValue(Name name, int index) { Assert.notNull(name, "name must not be null"); LdapName ldapName = returnOrConstructLdapNameFromName(name); Rdn rdn = ldapName.getRdn(index); if(rdn.size() > 1) { LOGGER.warn("Rdn at position " + index + " of dn '" + name + "' is multi-value - returned value is not to be trusted. " + "Consider using name-based getValue method instead"); } return rdn.getValue(); }
/** * Get the value of the Rdn at the requested index in the supplied Name. * * @param name the Name to work on. * @param index The 0-based index of the rdn value to retrieve. Must be in the range [0,size()). * @return the value of the rdn at the requested index. * @throws IndexOutOfBoundsException if index is outside the specified range. * @since 2.0 */ public static Object getValue(Name name, int index) { Assert.notNull(name, "name must not be null"); LdapName ldapName = returnOrConstructLdapNameFromName(name); Rdn rdn = ldapName.getRdn(index); if(rdn.size() > 1) { LOGGER.warn("Rdn at position " + index + " of dn '" + name + "' is multi-value - returned value is not to be trusted. " + "Consider using name-based getValue method instead"); } return rdn.getValue(); }
if (suffixDn.size() > 0 && suffixDn.getRdn(0).size() == 0)