From 6ef6d368ca5c2ecd06db36d5b6e7ea8243547a61 Mon Sep 17 00:00:00 2001 From: Dmytro Rud Date: Wed, 25 Oct 2023 19:31:48 +0200 Subject: [PATCH] allow instantiation of RecordingAuditMessageTransmission by the Spring Boot started --- .../audit/protocol/AuditTransmissionChannel.java | 3 ++- .../protocol/RecordingAuditMessageTransmission.java | 10 ++++++++++ .../ihe/fhir/chppqm/chppq5/ChPpq5TestRouteBuilder.java | 6 ------ 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/commons/audit/src/main/java/org/openehealth/ipf/commons/audit/protocol/AuditTransmissionChannel.java b/commons/audit/src/main/java/org/openehealth/ipf/commons/audit/protocol/AuditTransmissionChannel.java index 2f1b3474a0..a8a6b87bd1 100644 --- a/commons/audit/src/main/java/org/openehealth/ipf/commons/audit/protocol/AuditTransmissionChannel.java +++ b/commons/audit/src/main/java/org/openehealth/ipf/commons/audit/protocol/AuditTransmissionChannel.java @@ -36,7 +36,8 @@ public enum AuditTransmissionChannel { NIO_TLS("NIO-TLS", NettyTLSSyslogSenderImpl.class), VERTX_TLS("VERTX-TLS", VertxTLSSyslogSenderImpl.class), NETTY_TLS("NETTY-TLS", NettyTLSSyslogSenderImpl.class), - REACTOR_NETTY_TLS("REACTOR-NETTY-TLS", ReactorNettyTLSSyslogSenderImpl.class); + REACTOR_NETTY_TLS("REACTOR-NETTY-TLS", ReactorNettyTLSSyslogSenderImpl.class), + RECORDING("RECORDING", RecordingAuditMessageTransmission.class); private final String protocolName; private final Class protocol; diff --git a/commons/audit/src/main/java/org/openehealth/ipf/commons/audit/protocol/RecordingAuditMessageTransmission.java b/commons/audit/src/main/java/org/openehealth/ipf/commons/audit/protocol/RecordingAuditMessageTransmission.java index 9aac28dfc3..443fa34c38 100644 --- a/commons/audit/src/main/java/org/openehealth/ipf/commons/audit/protocol/RecordingAuditMessageTransmission.java +++ b/commons/audit/src/main/java/org/openehealth/ipf/commons/audit/protocol/RecordingAuditMessageTransmission.java @@ -18,6 +18,7 @@ import org.openehealth.ipf.commons.audit.AuditContext; import org.openehealth.ipf.commons.audit.AuditMetadataProvider; +import org.openehealth.ipf.commons.audit.TlsParameters; import java.util.*; @@ -30,6 +31,15 @@ */ public class RecordingAuditMessageTransmission implements AuditTransmissionProtocol { + public RecordingAuditMessageTransmission() { + } + + /** + * This constructor is required to allow instantiation by the Spring Boot starter. + */ + public RecordingAuditMessageTransmission(TlsParameters dummy) { + } + private final List messages = new ArrayList<>(); @Override diff --git a/platform-camel/ihe/fhir/r4/chppqm/src/test/java/org/openehealth/ipf/platform/camel/ihe/fhir/chppqm/chppq5/ChPpq5TestRouteBuilder.java b/platform-camel/ihe/fhir/r4/chppqm/src/test/java/org/openehealth/ipf/platform/camel/ihe/fhir/chppqm/chppq5/ChPpq5TestRouteBuilder.java index 37805931ee..a6d6d0a3d3 100644 --- a/platform-camel/ihe/fhir/r4/chppqm/src/test/java/org/openehealth/ipf/platform/camel/ihe/fhir/chppqm/chppq5/ChPpq5TestRouteBuilder.java +++ b/platform-camel/ihe/fhir/r4/chppqm/src/test/java/org/openehealth/ipf/platform/camel/ihe/fhir/chppqm/chppq5/ChPpq5TestRouteBuilder.java @@ -17,20 +17,14 @@ package org.openehealth.ipf.platform.camel.ihe.fhir.chppqm.chppq5; import org.apache.camel.builder.RouteBuilder; -import org.hl7.fhir.r4.model.Bundle; import org.hl7.fhir.r4.model.Consent; import org.openehealth.ipf.commons.ihe.fhir.Constants; -import org.openehealth.ipf.commons.ihe.fhir.chppqm.ChPpqmConsentCreator; -import org.openehealth.ipf.commons.ihe.fhir.chppqm.ChPpqmUtils; import org.openehealth.ipf.commons.ihe.fhir.chppqm.chppq5.ChPpq5SearchParameters; import org.openehealth.ipf.platform.camel.core.adapter.ValidatorAdapter; -import java.util.ArrayList; import java.util.List; -import java.util.UUID; import static org.openehealth.ipf.commons.ihe.fhir.chppqm.ChPpqmConsentCreator.*; -import static org.openehealth.ipf.commons.ihe.fhir.chppqm.ChPpqmConsentCreator.createUuid; import static org.openehealth.ipf.platform.camel.ihe.fhir.core.FhirCamelValidators.*; public class ChPpq5TestRouteBuilder extends RouteBuilder {