You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ri...@apache.org on 2020/03/17 21:28:44 UTC
[incubator-streampipes-extensions] branch dev updated:
STREAMPIPES-56: Use explicit annotation in SecretStaticProperty
This is an automated email from the ASF dual-hosted git repository.
riemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes-extensions.git
The following commit(s) were added to refs/heads/dev by this push:
new c0580c1 STREAMPIPES-56: Use explicit annotation in SecretStaticProperty
c0580c1 is described below
commit c0580c1c12ccdb5f6d4998c50e07d0f13dfc0a5f
Author: Dominik Riemer <ri...@fzi.de>
AuthorDate: Tue Mar 17 22:28:30 2020 +0100
STREAMPIPES-56: Use explicit annotation in SecretStaticProperty
---
.../sinks/internal/jvm/notification/NotificationProducer.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/streampipes-sinks-internal-jvm/src/main/java/org/apache/streampipes/sinks/internal/jvm/notification/NotificationProducer.java b/streampipes-sinks-internal-jvm/src/main/java/org/apache/streampipes/sinks/internal/jvm/notification/NotificationProducer.java
index 77355dd..58fdca1 100644
--- a/streampipes-sinks-internal-jvm/src/main/java/org/apache/streampipes/sinks/internal/jvm/notification/NotificationProducer.java
+++ b/streampipes-sinks-internal-jvm/src/main/java/org/apache/streampipes/sinks/internal/jvm/notification/NotificationProducer.java
@@ -29,6 +29,7 @@ import org.apache.streampipes.wrapper.context.EventSinkRuntimeContext;
import org.apache.streampipes.wrapper.runtime.EventSink;
import java.util.Date;
+import java.util.UUID;
public class NotificationProducer implements EventSink<NotificationParameters> {
@@ -59,6 +60,8 @@ public class NotificationProducer implements EventSink<NotificationParameters> {
public void onEvent(Event inputEvent) {
Date currentDate = new Date();
Notification notification = new Notification();
+ notification.setId(UUID.randomUUID().toString());
+ notification.setRead(false);
notification.setTitle(title);
notification.setMessage(replacePlaceholders(inputEvent, content));
notification.setCreatedAt(currentDate);