Search in sources :

Example 1 with UserCSV

use of org.eclipse.sw360.portal.users.UserCSV in project sw360portal by sw360.

the class UserPortlet method getUsersFromCSV.

private List<UserCSV> getUsersFromCSV(List<CSVRecord> records) {
    List<UserCSV> users = new ArrayList<>();
    for (CSVRecord record : records) {
        try {
            UserCSV user = new UserCSV(record);
            users.add(user);
        } catch (IndexOutOfBoundsException e) {
            log.error("Broken csv record");
        }
    }
    return users;
}
Also used : UserCSV(org.eclipse.sw360.portal.users.UserCSV) CSVRecord(org.apache.commons.csv.CSVRecord)

Aggregations

CSVRecord (org.apache.commons.csv.CSVRecord)1 UserCSV (org.eclipse.sw360.portal.users.UserCSV)1