class ProjectServiceImpl extends AbstractProjectServiceImpl implements ProjectService {

    @Override
    @Transactional
    public ServiceResult<ProjectResource> createProjectFromApplication(long applicationId) {

        return getApplication(applicationId).andOnSuccess(application -> {

            if (FundingDecisionStatus.FUNDED.equals(application.getFundingDecision())) {
                return createSingletonProjectFromApplicationId(applicationId);
            } else {
                return serviceFailure(CREATE_PROJECT_FROM_APPLICATION_FAILS);
            }
        });
    }

}