class ProjectServiceImpl extends AbstractProjectServiceImpl implements ProjectService {

    @Override
    @Transactional
    public ServiceResult<Void> createProjectsFromFundingDecisions(Map<Long, FundingDecision> applicationFundingDecisions) {
        List<ServiceResult<ProjectResource>> projectCreationResults = applicationFundingDecisions
                .keySet()
                .stream()
                .filter(d -> applicationFundingDecisions.get(d).equals(FundingDecision.FUNDED))
                .map(this::createSingletonProjectFromApplicationId)
                .collect(toList());

        boolean anyProjectCreationFailed = simpleAnyMatch(projectCreationResults, BaseFailingOrSucceedingResult::isFailure);

        return anyProjectCreationFailed ?
                serviceFailure(CREATE_PROJECT_FROM_APPLICATION_FAILS) : serviceSuccess();
    }

}