class ProjectTermsModelPopulator {

    public ProjectTermsViewModel populate(long projectId,
                                          long organisationId) {
        ProjectResource project = projectRestService.getProjectById(projectId).getSuccess();
        OrganisationResource organisation = organisationRestService.getOrganisationById(organisationId).getSuccess();
        CompetitionResource competition = competitionRestService.getCompetitionById(project.getCompetition()).getSuccess();
        PendingPartnerProgressResource pendingPartnerProgressResource = pendingPartnerProgressRestService.getPendingPartnerProgress(projectId, organisationId).getSuccess();

        return new ProjectTermsViewModel(
                projectId,
                organisation.getId(),
                competition.getTermsAndConditions().getTemplate(),
                pendingPartnerProgressResource.isTermsAndConditionsComplete(),
                pendingPartnerProgressResource.getTermsAndConditionsCompletedOn()
        );
    }

    public  ProjectTermsModelPopulator(ProjectRestService projectRestService,
                                      CompetitionRestService competitionRestService,
                                      OrganisationRestService organisationRestService,
                                      PendingPartnerProgressRestService pendingPartnerProgressRestService);

}