class ActivityLogServiceImpl implements ActivityLogService {

    @Override
    public void recordDocumentActivityByProjectId(long projectId, ActivityType activityType, long documentConfigId) {
        projectRepository.findById(projectId)
                .ifPresent(project -> {
                    competitionDocumentConfigRepository.findById(documentConfigId).ifPresent(document -> {
                        ActivityLog log = new ActivityLog(project.getApplication(), activityType, document);
                        activityLogRepository.save(log);
                    });
                });
    }

}