class ActivityDataIOEditorWidget implements ActivityDataIOEditorWidgetView.Presenter {

    public void setData(final List<AssignmentRow> assignmentRows) {
        // Hide the properties which shouldn't be shown
        hiddenPropertyRows.clear();
        if (disallowedNames != null && !disallowedNames.isEmpty()) {
            for (int i = assignmentRows.size() - 1; i >= 0; i--) {
                AssignmentRow row = assignmentRows.get(i);
                if (row.getName() != null && !row.getName().isEmpty()) {
                    if (disallowedNames.contains(row.getName().toLowerCase())) {
                        assignmentRows.remove(i);
                        hiddenPropertyRows.add(0,
                                               row);
                    }
                }
            }
        }
        if (assignmentRows.isEmpty()) {
            view.setNoneDisplayStyle();
        } else {
            view.setTableDisplayStyle();
        }
        view.setAssignmentRows(assignmentRows);
        for (int i = 0; i < assignmentRows.size(); i++) {
            view.getAssignmentWidget(i).setParentWidget(this);
            view.getAssignmentWidget(i).setDisallowedNames(disallowedNames,
                                                           disallowedNameErrorMessage);
            view.getAssignmentWidget(i).setAllowDuplicateNames(allowDuplicateNames,
                                                               duplicateNameErrorMessage);
        }
    }

}