-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
70 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 0 additions & 26 deletions
26
.../protege/webprotege/gateway/websocket/config/events/ProjectLinearizationChangedEvent.java
This file was deleted.
Oops, something went wrong.
68 changes: 68 additions & 0 deletions
68
...edu/stanford/protege/webprotege/gateway/websocket/config/events/UpdateUiHistoryEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
package edu.stanford.protege.webprotege.gateway.websocket.config.events; | ||
|
||
import com.fasterxml.jackson.annotation.*; | ||
import com.google.common.base.Objects; | ||
import edu.stanford.protege.webprotege.common.*; | ||
|
||
import java.util.Set; | ||
|
||
@JsonTypeName(UpdateUiHistoryEvent.CHANNEL) | ||
public record UpdateUiHistoryEvent(EventId eventId, | ||
ProjectId projectId, | ||
Set<String> affectedEntityIris) implements ProjectEvent { | ||
|
||
@JsonCreator | ||
public static UpdateUiHistoryEvent create(@JsonProperty("eventId") EventId eventId, | ||
@JsonProperty("projectId") ProjectId projectId, | ||
@JsonProperty("afectedEntityIris") Set<String> afectedEntityIris | ||
) { | ||
return new UpdateUiHistoryEvent(eventId, projectId, afectedEntityIris); | ||
} | ||
|
||
public static final String CHANNEL = "webprotege.events.projects.uiHistory.UpdateUiHistoryEvent"; | ||
|
||
@JsonProperty("projectId") | ||
public ProjectId projectId() { | ||
return this.projectId; | ||
} | ||
|
||
@Override | ||
@JsonProperty("eventId") | ||
public EventId eventId() { | ||
return eventId; | ||
} | ||
|
||
@Override | ||
@JsonProperty("afectedEntityIris") | ||
public Set<String> affectedEntityIris() { | ||
return affectedEntityIris; | ||
} | ||
|
||
@Override | ||
public String getChannel() { | ||
return CHANNEL; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
UpdateUiHistoryEvent that = (UpdateUiHistoryEvent) o; | ||
return Objects.equal(eventId, that.eventId) && Objects.equal(projectId, that.projectId) && Objects.equal(affectedEntityIris, that.affectedEntityIris); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hashCode(eventId, projectId, affectedEntityIris); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "UpdateUiHistoryEvent{" + | ||
"eventId=" + eventId + | ||
", projectId=" + projectId + | ||
", subjects=" + affectedEntityIris + | ||
'}'; | ||
} | ||
|
||
} |