| | |
| | | import org.forgerock.opendj.ldap.LinkedAttribute; |
| | | import org.forgerock.opendj.ldap.LinkedHashMapEntry; |
| | | import org.forgerock.opendj.ldap.ModificationType; |
| | | import org.forgerock.opendj.ldap.RDN; |
| | | import org.forgerock.opendj.ldap.ResultCode; |
| | | import org.forgerock.opendj.ldap.requests.ModifyRequest; |
| | | import org.forgerock.opendj.ldap.requests.Requests; |
| | |
| | | addObjectClassesToEntry(objectClasses, entry); |
| | | |
| | | // Create the branch's naming attribute. |
| | | RDN rdn = dn.parent(dn.size() - 1).rdn(); |
| | | entry.addAttribute(rdn.getFirstAVA().toAttribute()); |
| | | entry.addAttribute(dn.rdn().getFirstAVA().toAttribute()); |
| | | |
| | | // Create the entry. |
| | | try { |
| | |
| | | // Create the naming attribute if there is not naming property. |
| | | PropertyDefinition<?> namingPropertyDef = getNamingPropertyDefinition(); |
| | | if (namingPropertyDef == null) { |
| | | RDN rdn = dn.parent(dn.size() - 1).rdn(); |
| | | entry.addAttribute(rdn.getFirstAVA().toAttribute()); |
| | | entry.addAttribute(dn.rdn().getFirstAVA().toAttribute()); |
| | | } |
| | | |
| | | // Create the remaining attributes. |