class GrantOfferLetterServiceImpl extends BaseTransactionalService implements GrantOfferLetterService {

    @Override
    @Transactional
    public ServiceResult<Void> resetGrantOfferLetter(Long projectId) {
        Project project = getProject(projectId).getSuccess();

        if (project.getGrantOfferLetter() != null) {
            fileService.deleteFileIgnoreNotFound(project.getGrantOfferLetter().getId());
            project.setGrantOfferLetter(null);
        }
        if (project.getAdditionalContractFile() != null) {
            fileService.deleteFileIgnoreNotFound(project.getAdditionalContractFile().getId());
            project.setAdditionalContractFile(null);
        }
        golWorkflowHandler.grantOfferLetterReset(project, getCurrentlyLoggedInUser().getSuccess());
        return serviceSuccess();
    }

}