From 92a12193fe279ff8e22796065fd33241a876296e Mon Sep 17 00:00:00 2001 From: Simon Hirtreiter Date: Wed, 10 Jan 2024 14:46:39 +0100 Subject: [PATCH] connector fix ConstraintDeclarationException method override --- .../core/application/port/in/CreateIncidentInPort.java | 4 +++- .../connector/core/application/port/in/ExecuteTaskInPort.java | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/digiwf-connector/digiwf-connector-starter/src/main/java/de/muenchen/oss/digiwf/connector/core/application/port/in/CreateIncidentInPort.java b/digiwf-connector/digiwf-connector-starter/src/main/java/de/muenchen/oss/digiwf/connector/core/application/port/in/CreateIncidentInPort.java index 85241be2a8..0b45bcafec 100644 --- a/digiwf-connector/digiwf-connector-starter/src/main/java/de/muenchen/oss/digiwf/connector/core/application/port/in/CreateIncidentInPort.java +++ b/digiwf-connector/digiwf-connector-starter/src/main/java/de/muenchen/oss/digiwf/connector/core/application/port/in/CreateIncidentInPort.java @@ -1,5 +1,7 @@ package de.muenchen.oss.digiwf.connector.core.application.port.in; +import jakarta.validation.constraints.NotBlank; + public interface CreateIncidentInPort { /** @@ -9,6 +11,6 @@ public interface CreateIncidentInPort { * @param messageName name of the message that should be answered * @param messageContent optional content of message for provide detailed information */ - void createIncident(String processInstanceId, String messageName, String messageContent); + void createIncident(@NotBlank String processInstanceId, @NotBlank String messageName, String messageContent); } diff --git a/digiwf-connector/digiwf-connector-starter/src/main/java/de/muenchen/oss/digiwf/connector/core/application/port/in/ExecuteTaskInPort.java b/digiwf-connector/digiwf-connector-starter/src/main/java/de/muenchen/oss/digiwf/connector/core/application/port/in/ExecuteTaskInPort.java index 8409ee4977..5d5077123d 100644 --- a/digiwf-connector/digiwf-connector-starter/src/main/java/de/muenchen/oss/digiwf/connector/core/application/port/in/ExecuteTaskInPort.java +++ b/digiwf-connector/digiwf-connector-starter/src/main/java/de/muenchen/oss/digiwf/connector/core/application/port/in/ExecuteTaskInPort.java @@ -1,5 +1,6 @@ package de.muenchen.oss.digiwf.connector.core.application.port.in; +import jakarta.validation.Valid; import jakarta.validation.constraints.NotBlank; import lombok.*; @@ -7,7 +8,7 @@ public interface ExecuteTaskInPort { - void executeTask(ExecuteTaskCommand command); + void executeTask(@Valid ExecuteTaskCommand command); @Data @ToString