private List<Assignment> createAssignments(List<Entry> assignmentEntries) throws NoSuchNodeException,
MissingParentException {
List<Assignment> assignments = Lists.newArrayList();
for (Entry entry : assignmentEntries) {
Assignment assignment = new Assignment();
assignment.setProject(getLdapAttributeValue(ldapDao.lookup(DnFactory.assignmentProject(entry.getDn()))));
assignment.setUser(getLdapAttributeValue(ldapDao.lookup(DnFactory.assignmentUser(entry.getDn()))));
assignment.setPermissions(getNamesOfDirectChildren(ldapDao.getDirectChildren(DnFactory
.assignmentPermissions(entry.getDn()))));
assignment.setRoles(getNamesOfDirectChildren(ldapDao.getDirectChildren(DnFactory.assignmentRoles(entry
.getDn()))));
assignment.generateUuid();
assignments.add(assignment);
}
return assignments;
}