From d98121cd1fdc75ef526701872271ee7dfcfcff72 Mon Sep 17 00:00:00 2001 From: Gheorghe Soimu Date: Wed, 21 Aug 2024 14:56:53 +0300 Subject: [PATCH] added ProjectLinearizationChangedEvent to objectMapper --- .../config/ObjectMapperConfiguration.java | 2 ++ .../ProjectLinearizationChangedEvent.java | 26 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 src/main/java/edu/stanford/protege/webprotege/gateway/websocket/config/events/ProjectLinearizationChangedEvent.java diff --git a/src/main/java/edu/stanford/protege/webprotege/gateway/websocket/config/ObjectMapperConfiguration.java b/src/main/java/edu/stanford/protege/webprotege/gateway/websocket/config/ObjectMapperConfiguration.java index 1e20aa1..68d4fab 100644 --- a/src/main/java/edu/stanford/protege/webprotege/gateway/websocket/config/ObjectMapperConfiguration.java +++ b/src/main/java/edu/stanford/protege/webprotege/gateway/websocket/config/ObjectMapperConfiguration.java @@ -11,6 +11,7 @@ import edu.stanford.protege.webprotege.change.OntologyChangedEvent; import edu.stanford.protege.webprotege.event.*; import edu.stanford.protege.webprotege.frame.*; +import edu.stanford.protege.webprotege.gateway.websocket.config.events.ProjectLinearizationChangedEvent; import edu.stanford.protege.webprotege.hierarchy.EntityHierarchyChangedEvent; import edu.stanford.protege.webprotege.issues.CommentPostedEvent; import edu.stanford.protege.webprotege.issues.CommentUpdatedEvent; @@ -313,6 +314,7 @@ public ObjectMapper objectMapper() { OntologyBrowserTextChangedEvent.class, PermissionsChangedEvent.class, ProjectChangedEvent.class, + ProjectLinearizationChangedEvent.class, ProjectMovedToTrashEvent.class, OntologyChangedEvent.class, ProjectRemovedFromTrashEvent.class, diff --git a/src/main/java/edu/stanford/protege/webprotege/gateway/websocket/config/events/ProjectLinearizationChangedEvent.java b/src/main/java/edu/stanford/protege/webprotege/gateway/websocket/config/events/ProjectLinearizationChangedEvent.java new file mode 100644 index 0000000..2c0cfc5 --- /dev/null +++ b/src/main/java/edu/stanford/protege/webprotege/gateway/websocket/config/events/ProjectLinearizationChangedEvent.java @@ -0,0 +1,26 @@ +package edu.stanford.protege.webprotege.gateway.websocket.config.events; + +import com.fasterxml.jackson.annotation.JsonTypeName; +import edu.stanford.protege.webprotege.common.*; +import org.jetbrains.annotations.NotNull; + +import static edu.stanford.protege.webprotege.gateway.websocket.config.events.ProjectLinearizationChangedEvent.CHANNEL; + +@JsonTypeName(CHANNEL) +public record ProjectLinearizationChangedEvent(EventId eventId, + ProjectId projectId) implements ProjectEvent { + public static final String CHANNEL = "webprotege.linearization.ProjectLinearizationChangedEvent"; + + public String getChannel() { + return CHANNEL; + } + + public @NotNull EventId eventId() { + return this.eventId; + } + + public @NotNull ProjectId projectId() { + return this.projectId; + } + +}