Skip to content

Commit

Permalink
renamed NewRevisionsEvent.java
Browse files Browse the repository at this point in the history
  • Loading branch information
soimugeo committed Sep 20, 2024
1 parent 73bb90a commit 6088f22
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ public NewRevisionsEventEmitterServiceImpl(EventDispatcher eventDispatcher,
@Override
public void emitNewRevisionsEvent(ProjectId projectId, List<EntityLinearizationHistory> entityLinearizationHistories) {
List<ProjectChangeForEntity> changeList = projectChangesManager.getProjectChangesForHistories(projectId, entityLinearizationHistories);
NewRevisionsEvent revisionsEvent = NewRevisionsEvent.create(EventId.generate(), projectId, changeList);
NewLinearizationRevisionsEvent revisionsEvent = NewLinearizationRevisionsEvent.create(EventId.generate(), projectId, changeList);
eventDispatcher.dispatchEvent(revisionsEvent);
}

@Override
public void emitNewRevisionsEvent(ProjectId projectId, String whoficEntityIri, LinearizationRevision entityLinearizationRevision) {
ProjectChangeForEntity projectChange = projectChangesManager.getProjectChangesForRevision(projectId, whoficEntityIri, entityLinearizationRevision);
NewRevisionsEvent revisionsEvent = NewRevisionsEvent.create(EventId.generate(), projectId, List.of(projectChange));
NewLinearizationRevisionsEvent revisionsEvent = NewLinearizationRevisionsEvent.create(EventId.generate(), projectId, List.of(projectChange));
eventDispatcher.dispatchEvent(revisionsEvent);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@

import java.util.List;

import static edu.stanford.protege.webprotege.linearizationservice.uiHistoryConcern.changes.NewRevisionsEvent.CHANNEL;
import static edu.stanford.protege.webprotege.linearizationservice.uiHistoryConcern.changes.NewLinearizationRevisionsEvent.CHANNEL;


@JsonTypeName(CHANNEL)
public record NewRevisionsEvent(
public record NewLinearizationRevisionsEvent(
EventId eventId,
ProjectId projectId,
List<ProjectChangeForEntity> changeList
) implements ProjectEvent {
public final static String CHANNEL = "webprotege.events.projects.linearizations.NewRevisionsEvent";
public final static String CHANNEL = "webprotege.events.projects.linearizations.NewLinearizationRevisionsEvent";

public static NewRevisionsEvent create(EventId eventId,
ProjectId projectId,
List<ProjectChangeForEntity> changeList) {
return new NewRevisionsEvent(eventId, projectId, changeList);
public static NewLinearizationRevisionsEvent create(EventId eventId,
ProjectId projectId,
List<ProjectChangeForEntity> changeList) {
return new NewLinearizationRevisionsEvent(eventId, projectId, changeList);
}

@NotNull
Expand Down

0 comments on commit 6088f22

Please sign in to comment.