From a6464fb989321a5556a068931756d1c43ad5fb14 Mon Sep 17 00:00:00 2001 From: Timon Back Date: Mon, 10 Jun 2024 17:15:52 +0200 Subject: [PATCH] feat(stomp): update SpringwolfStompConfigProperties --- .../annotations/OperationCustomizer.java | 3 ++ .../SpringwolfStompConfigProperties.java | 36 +++++++++++-------- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/operations/annotations/OperationCustomizer.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/operations/annotations/OperationCustomizer.java index 2f3f8d717..56f34474a 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/operations/annotations/OperationCustomizer.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/operations/annotations/OperationCustomizer.java @@ -5,6 +5,9 @@ import java.lang.reflect.Method; +/** + * Allows for customization of the Operation object after it has been finalized by the scanner. + */ public interface OperationCustomizer { void customize(Operation operation, Method method); } diff --git a/springwolf-plugins/springwolf-stomp-plugin/src/main/java/io/github/springwolf/plugins/stomp/configuration/properties/SpringwolfStompConfigProperties.java b/springwolf-plugins/springwolf-stomp-plugin/src/main/java/io/github/springwolf/plugins/stomp/configuration/properties/SpringwolfStompConfigProperties.java index 68df60f8d..97166d2bc 100644 --- a/springwolf-plugins/springwolf-stomp-plugin/src/main/java/io/github/springwolf/plugins/stomp/configuration/properties/SpringwolfStompConfigProperties.java +++ b/springwolf-plugins/springwolf-stomp-plugin/src/main/java/io/github/springwolf/plugins/stomp/configuration/properties/SpringwolfStompConfigProperties.java @@ -15,12 +15,8 @@ @Setter public class SpringwolfStompConfigProperties { - @Nullable private Endpoint endpoint = new Endpoint(); - @Nullable - private Publishing publishing; - @Nullable private Scanner scanner; @@ -32,21 +28,13 @@ public static class Endpoint { private String user = ""; } - @Getter - @Setter - public static class Publishing { - - /** - * Enables/Disables the possibility to publish messages through springwolf on the configured stomp instance. - */ - private boolean enabled = false; - } - @Getter @Setter public static class Scanner { private static StompMessageMapping stompMessageMapping; + private static StompSendTo stompSendTo; + private static StompSendToUser stompSendToUser; @Getter @Setter @@ -57,5 +45,25 @@ public static class StompMessageMapping { */ private boolean enabled = true; } + + @Getter + @Setter + public static class StompSendTo { + + /** + * This mirrors the ConfigConstant {@see SpringwolfStompConfigConstants#SPRINGWOLF_SCANNER_STOMP_SEND_TO_ENABLED} + */ + private boolean enabled = true; + } + + @Getter + @Setter + public static class StompSendToUser { + + /** + * This mirrors the ConfigConstant {@see SpringwolfStompConfigConstants#SPRINGWOLF_SCANNER_STOMP_SEND_TO_USER_ENABLED} + */ + private boolean enabled = true; + } } }