Skip to content

Commit

Permalink
Merge pull request #20 from MEITREX/ContentMediaRecordLinksSet
Browse files Browse the repository at this point in the history
Adds ContentMediaRecordLinksSetEvent and related dapr topic & methods
  • Loading branch information
myluki2000 authored Aug 7, 2024
2 parents 5607b6e + e0f2d79 commit b8b4517
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ public enum DaprTopic {

MEDIA_RECORD_DELETED("media-record-deleted"),

CONTENT_MEDIA_RECORD_LINKS_SET("content-media-record-links-set"),

ITEM_CHANGED("item-changed");

private final String topic;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,12 @@ public void notifyMediaRecordFileCreated(final MediaRecordFileCreatedEvent media
public void notifyMediaRecordDeleted(final MediaRecordDeletedEvent mediaRecordDeletedEvent) {
publishEvent(mediaRecordDeletedEvent, DaprTopic.MEDIA_RECORD_DELETED);
}

/**
* Method to notify when media record links for a media content were set.
* @param event of the content where links were set.
*/
public void notifyContentMediaRecordLinksSet(final ContentMediaRecordLinksSetEvent event) {
publishEvent(event, DaprTopic.CONTENT_MEDIA_RECORD_LINKS_SET);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package de.unistuttgart.iste.meitrex.common.event;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

import java.util.List;
import java.util.UUID;

@Data
@AllArgsConstructor
@Builder
public class ContentMediaRecordLinksSetEvent {
private UUID contentId;
private List<UUID> mediaRecordIds;
}

0 comments on commit b8b4517

Please sign in to comment.