From e29a43c9266543a99929d3dbfbaf6be5c2198f39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaan=20=C3=87ayl=C4=B1?= <38523756+kaancayli@users.noreply.github.com> Date: Fri, 21 Jun 2024 01:21:13 +0200 Subject: [PATCH] Rename JOL event --- .../www1/artemis/service/competency/CompetencyJolService.java | 4 ++-- .../{CompetencyJolEvent.java => CompetencyJolSetEvent.java} | 4 ++-- .../service/connectors/pyris/event/PyrisEventService.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) rename src/main/java/de/tum/in/www1/artemis/service/connectors/pyris/event/{CompetencyJolEvent.java => CompetencyJolSetEvent.java} (72%) diff --git a/src/main/java/de/tum/in/www1/artemis/service/competency/CompetencyJolService.java b/src/main/java/de/tum/in/www1/artemis/service/competency/CompetencyJolService.java index f9694a804f9b..a292f9b10e1b 100644 --- a/src/main/java/de/tum/in/www1/artemis/service/competency/CompetencyJolService.java +++ b/src/main/java/de/tum/in/www1/artemis/service/competency/CompetencyJolService.java @@ -20,7 +20,7 @@ import de.tum.in.www1.artemis.repository.CompetencyRepository; import de.tum.in.www1.artemis.repository.UserRepository; import de.tum.in.www1.artemis.repository.competency.CompetencyJolRepository; -import de.tum.in.www1.artemis.service.connectors.pyris.event.CompetencyJolEvent; +import de.tum.in.www1.artemis.service.connectors.pyris.event.CompetencyJolSetEvent; import de.tum.in.www1.artemis.service.connectors.pyris.event.PyrisEventService; import de.tum.in.www1.artemis.web.rest.dto.competency.CompetencyJolDTO; import de.tum.in.www1.artemis.web.rest.dto.competency.CompetencyJolPairDTO; @@ -88,7 +88,7 @@ public void setJudgementOfLearning(long competencyId, long userId, short jolValu // Inform Iris so it can send a message to the user try { if (userId % 3 > 0) { // HD3-GROUPS: Iris groups are 1 & 2 - service.trigger(new CompetencyJolEvent(jol)); + service.trigger(new CompetencyJolSetEvent(jol)); } } catch (Exception e) { diff --git a/src/main/java/de/tum/in/www1/artemis/service/connectors/pyris/event/CompetencyJolEvent.java b/src/main/java/de/tum/in/www1/artemis/service/connectors/pyris/event/CompetencyJolSetEvent.java similarity index 72% rename from src/main/java/de/tum/in/www1/artemis/service/connectors/pyris/event/CompetencyJolEvent.java rename to src/main/java/de/tum/in/www1/artemis/service/connectors/pyris/event/CompetencyJolSetEvent.java index 9a82a0f79a0a..570a3f78a1f4 100644 --- a/src/main/java/de/tum/in/www1/artemis/service/connectors/pyris/event/CompetencyJolEvent.java +++ b/src/main/java/de/tum/in/www1/artemis/service/connectors/pyris/event/CompetencyJolSetEvent.java @@ -3,11 +3,11 @@ import de.tum.in.www1.artemis.domain.competency.CompetencyJol; import de.tum.in.www1.artemis.service.iris.session.IrisCourseChatSessionService; -public class CompetencyJolEvent extends PyrisEvent { +public class CompetencyJolSetEvent extends PyrisEvent { private final CompetencyJol event; - public CompetencyJolEvent(CompetencyJol event) { + public CompetencyJolSetEvent(CompetencyJol event) { this.event = event; } diff --git a/src/main/java/de/tum/in/www1/artemis/service/connectors/pyris/event/PyrisEventService.java b/src/main/java/de/tum/in/www1/artemis/service/connectors/pyris/event/PyrisEventService.java index 8aa60f48ef4c..65c44bfa9065 100644 --- a/src/main/java/de/tum/in/www1/artemis/service/connectors/pyris/event/PyrisEventService.java +++ b/src/main/java/de/tum/in/www1/artemis/service/connectors/pyris/event/PyrisEventService.java @@ -26,8 +26,8 @@ public PyrisEventService(IrisCourseChatSessionService irisCourseChatSessionServi */ public void trigger(PyrisEvent event) { switch (event) { - case CompetencyJolEvent competencyJolEvent -> { - competencyJolEvent.handleEvent(irisCourseChatSessionService); + case CompetencyJolSetEvent competencyJolSetEvent -> { + competencyJolSetEvent.handleEvent(irisCourseChatSessionService); } default -> throw new UnsupportedOperationException("Unsupported event: " + event); }