@Test public void testGetTemporaryDN_MultivalueDN() { LdapName expectedOriginalName = LdapUtils.newLdapName( "cn=john doe+sn=doe, ou=somecompany, c=SE"); DefaultTempEntryRenamingStrategy tested = new DefaultTempEntryRenamingStrategy(); Name result = tested.getTemporaryName(expectedOriginalName); assertThat(result.toString()).isEqualTo("cn=john doe+sn=doe_temp,ou=somecompany,c=SE"); }
public Name getTemporaryName(Name originalName) { LdapName temporaryName = LdapUtils.newLdapName(originalName); try { String leafNode = (String) temporaryName.remove(temporaryName.size() - 1); temporaryName.add(new Rdn(leafNode + tempSuffix)); } catch (InvalidNameException e) { throw new org.springframework.ldap.InvalidNameException(e); } return temporaryName; }
DefaultTempEntryRenamingStrategy implements
        TempEntryRenamingStrategy { public Name getTemporaryName(Name originalName) { LdapName temporaryName = LdapUtils.newLdapName(originalName); try { String leafNode = (String) temporaryName.remove(temporaryName.size() - 1); temporaryName.add(new Rdn(leafNode + tempSuffix)); } catch (InvalidNameException e) { throw new org.springframework.ldap.InvalidNameException(e); } return temporaryName; } }
DefaultTempEntryRenamingStrategy implements
        TempEntryRenamingStrategy { public Name getTemporaryName(Name originalName) { LdapName temporaryName = LdapUtils.newLdapName(originalName); try { String leafNode = (String) temporaryName.remove(temporaryName.size() - 1); temporaryName.add(new Rdn(leafNode + tempSuffix)); } catch (InvalidNameException e) { throw new org.springframework.ldap.InvalidNameException(e); } return temporaryName; }  }
DefaultTempEntryRenamingStrategy implements
        TempEntryRenamingStrategy { public Name getTemporaryName(Name originalName) { LdapName temporaryName = LdapUtils.newLdapName(originalName); try { String leafNode = (String) temporaryName.remove(temporaryName.size() - 1); temporaryName.add(new Rdn(leafNode + tempSuffix)); } catch (InvalidNameException e) { throw new org.springframework.ldap.InvalidNameException(e); } return temporaryName; }  Name getTemporaryName(Name originalName); String getTempSuffix(); void setTempSuffix(String tempSuffix); }
DefaultTempEntryRenamingStrategy implements
        TempEntryRenamingStrategy { public Name getTemporaryName(Name originalName) { LdapName temporaryName = LdapUtils.newLdapName(originalName); try { String leafNode = (String) temporaryName.remove(temporaryName.size() - 1); temporaryName.add(new Rdn(leafNode + tempSuffix)); } catch (InvalidNameException e) { throw new org.springframework.ldap.InvalidNameException(e); } return temporaryName; }  Name getTemporaryName(Name originalName); String getTempSuffix(); void setTempSuffix(String tempSuffix); static final String DEFAULT_TEMP_SUFFIX; }