class DocumentsServiceImpl extends AbstractProjectServiceImpl implements DocumentsService {

    @Override
    @Transactional
    public ServiceResult<Void> submitDocument(long projectId, long documentConfigId) {
        return find(getProject(projectId), getCompetitionDocumentConfig(documentConfigId)).
                andOnSuccess((project, projectDocumentConfig) -> validateProjectActive(project)
                        .andOnSuccess(() -> submitDocument(project, documentConfigId))
                ).andOnSuccessReturnVoid(() -> activityLogService.recordDocumentActivityByProjectId(projectId, ActivityType.DOCUMENT_UPLOADED, documentConfigId));

    }

}