class OrganisationalEligibilityFormPopulator implements CompetitionSetupFormPopulator {

    @Override
    public CompetitionSetupForm populateForm(CompetitionResource competitionResource) {
        CompetitionOrganisationConfigResource competitionOrganisationConfigResource = competitionOrganisationConfigRestService.findByCompetitionId(competitionResource.getId()).getSuccess();

        OrganisationalEligibilityForm organisationalEligibilityForm = new OrganisationalEligibilityForm();
        organisationalEligibilityForm.setInternationalOrganisationsApplicable(competitionOrganisationConfigResource.getInternationalOrganisationsAllowed());
        organisationalEligibilityForm.setLeadInternationalOrganisationsApplicable(competitionOrganisationConfigResource.getInternationalLeadOrganisationAllowed());

        return organisationalEligibilityForm;
    }

}