class DifferentSubtreeTempEntryRenamingStrategy implements
        TempEntryRenamingStrategy {

    public Name getTemporaryName(Name originalName) {
        int thisSequenceNo = NEXT_SEQUENCE_NO.getAndIncrement();

        LdapName tempName = LdapUtils.newLdapName(originalName);
        try {
            String leafNode = tempName.get(tempName.size() - 1) + thisSequenceNo;
            LdapName newName = LdapUtils.newLdapName(subtreeNode);
            newName.add(leafNode);

            return newName;
        } catch (InvalidNameException e) {
            throw new org.springframework.ldap.InvalidNameException(e);
        }
    }

    public  DifferentSubtreeTempEntryRenamingStrategy(Name subtreeNode);
    public  DifferentSubtreeTempEntryRenamingStrategy(String subtreeNode);

}