ePerson.update();
group.addMember(ePerson);
group.update();
} else {
throw new EntityException("Internal server error", "Could not create ePerson", 500);
}
} else {
throw new EntityException("Data error", "Duplicated ePerson", 500);
}
} else {
throw new IllegalArgumentException("Invalid id:" + ref.getId());
}
} catch (SQLException ex) {
throw new EntityException("Internal server error", "SQL error", 500);
} catch (AuthorizeException ex) {
throw new EntityException("Forbidden", "Forbidden", 403);
} catch (NumberFormatException ex) {
throw new EntityException("Bad request", "Could not parse input", 400);
}
return result;
}