class GrantOfferLetterServiceImpl extends BaseTransactionalService implements GrantOfferLetterService {

    @Override
    @Transactional
    public ServiceResult<Void> removeGrantOfferLetterFileEntry(Long projectId) {
        return getProject(projectId).
                andOnSuccess(project -> validateProjectIsActive(project).
                        andOnSuccess(() -> validateRemoveGrantOfferLetter(project)).
                        andOnSuccess(() -> removeGrantOfferLetterFileFromProject(project)).
                        andOnSuccess(fileEntry -> fileService.deleteFileIgnoreNotFound(fileEntry.getId())).
                        andOnSuccessReturnVoid());
    }

}