This is an automated email from the ASF dual-hosted git repository.

bossenti pushed a commit to branch dev
in repository 
https://gitbox.apache.org/repos/asf/incubator-streampipes-extensions.git

commit 6fdfa136ff4c797a033f1879b7e3f36c4961342e
Author: bossenti <[email protected]>
AuthorDate: Fri Apr 30 08:26:53 2021 +0200

    [STREAMPIPES-350] add label values as valueSpecification
---
 .../transformation/jvm/processor/state/labeler/LabelerUtils.java       | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/streampipes-processors-transformation-jvm/src/main/java/org/apache/streampipes/processors/transformation/jvm/processor/state/labeler/LabelerUtils.java
 
b/streampipes-processors-transformation-jvm/src/main/java/org/apache/streampipes/processors/transformation/jvm/processor/state/labeler/LabelerUtils.java
index 31db2f2..eba8d13 100644
--- 
a/streampipes-processors-transformation-jvm/src/main/java/org/apache/streampipes/processors/transformation/jvm/processor/state/labeler/LabelerUtils.java
+++ 
b/streampipes-processors-transformation-jvm/src/main/java/org/apache/streampipes/processors/transformation/jvm/processor/state/labeler/LabelerUtils.java
@@ -14,7 +14,7 @@ import java.util.List;
 
 public class LabelerUtils {
 
-    public static EventSchema resolveOutputStrategy(DataProcessorInvocation 
processingElement, String labelName) throws SpRuntimeException {
+    public static EventSchema resolveOutputStrategy(DataProcessorInvocation 
processingElement, String labelName, List<String> labelStrings) throws 
SpRuntimeException {
 
         List<EventProperty> properties = processingElement
                 .getInputStreams()
@@ -24,6 +24,7 @@ public class LabelerUtils {
 
         properties.add(PrimitivePropertyBuilder
                 .create(Datatypes.String, labelName)
+                .valueSpecification(labelName, "possible label values", 
labelStrings)
                 .domainProperty(SPSensor.STATE)
                 .scope(PropertyScope.DIMENSION_PROPERTY)
                 .build());

Reply via email to