class InternalProjectSetupRowPopulator {

    public List<InternalProjectSetupRow> populate(List<ProjectStatusResource> projectStatusResources, CompetitionResource competition, UserResource user) {

        return projectStatusResources.stream()
                .map(status -> new InternalProjectSetupRow(
                        status.getProjectTitle(),
                        status.getApplicationNumber(),
                        status.getProjectState(),
                        status.getNumberOfPartners(),
                        competition.getId(),
                        status.getProjectLeadOrganisationName(),
                        status.getProjectNumber(),
                        getProjectCells(status, competition.getProjectSetupStages(), user, competition.getId()),
                        ProjectActivityStates.COMPLETE == status.getGrantOfferLetterStatus(),
                        status.isSentToIfsPa()
                )).collect(Collectors.toList());
    }

}