class ActivityLogServiceImpl implements ActivityLogService {

    @Override
    public void recordActivityByProjectIdAndOrganisationId(long projectId, long organisationId, ActivityType activityType) {
        projectRepository.findById(projectId)
                .ifPresent(project -> {
                    organisationRepository.findById(organisationId).ifPresent(organisation -> {
                        ActivityLog log = new ActivityLog(project.getApplication(), activityType, organisation);
                        activityLogRepository.save(log);
                    });
                });
    }

}