From f827ca133edbea8096b356b414324c3204a113ef Mon Sep 17 00:00:00 2001 From: OZGCloud <ozgcloud@mgm-tp.com> Date: Wed, 22 Nov 2023 17:17:25 +0100 Subject: [PATCH] OZG-4185 OZG-4570 Rename properties in other places --- .../ClientAttributeRemoteService.java | 2 +- .../postfach/PostfachScheduler.java | 6 +++--- .../command/CommandRemoteService.java | 2 +- .../postfach/PostfachRemoteService.java | 2 +- .../vorgang/registry/RegistryScheduler.java | 6 +++--- .../vorgang/registry/RegistryService.java | 2 +- ...itional-spring-configuration-metadata.json | 19 +++++++------------ .../postfach/PostfachMailITCase.java | 8 ++++---- .../postfach/osi/OsiPostfachApiTestCase.java | 8 ++++---- .../osi/OsiPostfachRemoteServiceITCase.java | 8 ++++---- 10 files changed, 29 insertions(+), 34 deletions(-) diff --git a/nachrichten-manager/src/main/java/de/ozgcloud/nachrichten/attributes/ClientAttributeRemoteService.java b/nachrichten-manager/src/main/java/de/ozgcloud/nachrichten/attributes/ClientAttributeRemoteService.java index 1263c973b..a74bb37c1 100644 --- a/nachrichten-manager/src/main/java/de/ozgcloud/nachrichten/attributes/ClientAttributeRemoteService.java +++ b/nachrichten-manager/src/main/java/de/ozgcloud/nachrichten/attributes/ClientAttributeRemoteService.java @@ -36,7 +36,7 @@ import net.devh.boot.grpc.client.inject.GrpcClient; @Service class ClientAttributeRemoteService { - @GrpcClient("pluto") + @GrpcClient("vorgang-manager") private ClientAttributeServiceBlockingStub stub; public void setBooleanReadOnlyClientAttribute(String vorgangId, String attributeName, boolean value) { diff --git a/nachrichten-manager/src/main/java/de/ozgcloud/nachrichten/postfach/PostfachScheduler.java b/nachrichten-manager/src/main/java/de/ozgcloud/nachrichten/postfach/PostfachScheduler.java index 71c712b28..58dfa87a7 100644 --- a/nachrichten-manager/src/main/java/de/ozgcloud/nachrichten/postfach/PostfachScheduler.java +++ b/nachrichten-manager/src/main/java/de/ozgcloud/nachrichten/postfach/PostfachScheduler.java @@ -35,14 +35,14 @@ import net.javacrumbs.shedlock.spring.annotation.SchedulerLock; @Component @Profile("!itcase") @ConditionalOnBean(PostfachRemoteService.class) -@ConditionalOnProperty(name = { "kop.osi.postfach.scheduler.enabled" }) +@ConditionalOnProperty(name = { "ozgcloud.osi.postfach.scheduler.enabled" }) class PostfachScheduler { @Autowired private PostfachService service; - @Scheduled(initialDelayString = "${kop.osi.postfach.scheduler.initialDelay:5000}", // - fixedDelayString = "${kop.osi.postfach.scheduler.fixedDelay:900000}") + @Scheduled(initialDelayString = "${ozgcloud.osi.postfach.scheduler.initialDelay:5000}", // + fixedDelayString = "${ozgcloud.osi.postfach.scheduler.fixedDelay:900000}") @SchedulerLock(name = "PostfachScheduler") void runGetMessagesTask() { service.fetchAndPersistReplies(); diff --git a/notification-manager/src/main/java/de/ozgcloud/notification/command/CommandRemoteService.java b/notification-manager/src/main/java/de/ozgcloud/notification/command/CommandRemoteService.java index 21bfd4983..5b13781d2 100644 --- a/notification-manager/src/main/java/de/ozgcloud/notification/command/CommandRemoteService.java +++ b/notification-manager/src/main/java/de/ozgcloud/notification/command/CommandRemoteService.java @@ -33,7 +33,7 @@ import net.devh.boot.grpc.client.inject.GrpcClient; @Service class CommandRemoteService { - @GrpcClient("pluto") + @GrpcClient("vorgang-manager") private CommandServiceBlockingStub stub; @Autowired private CommandMapper mapper; diff --git a/notification-manager/src/main/java/de/ozgcloud/notification/postfach/PostfachRemoteService.java b/notification-manager/src/main/java/de/ozgcloud/notification/postfach/PostfachRemoteService.java index dcbdca72e..2daaaa7b2 100644 --- a/notification-manager/src/main/java/de/ozgcloud/notification/postfach/PostfachRemoteService.java +++ b/notification-manager/src/main/java/de/ozgcloud/notification/postfach/PostfachRemoteService.java @@ -33,7 +33,7 @@ import net.devh.boot.grpc.client.inject.GrpcClient; @Service class PostfachRemoteService { - @GrpcClient("pluto") + @GrpcClient("vorgang-manager") private PostfachServiceBlockingStub postfachServiceBlockingStub; public boolean isPostfachConfigured() { diff --git a/vorgang-manager-server/src/main/java/de/ozgcloud/vorgang/registry/RegistryScheduler.java b/vorgang-manager-server/src/main/java/de/ozgcloud/vorgang/registry/RegistryScheduler.java index 1803190a5..171439dbf 100644 --- a/vorgang-manager-server/src/main/java/de/ozgcloud/vorgang/registry/RegistryScheduler.java +++ b/vorgang-manager-server/src/main/java/de/ozgcloud/vorgang/registry/RegistryScheduler.java @@ -37,7 +37,7 @@ import net.javacrumbs.shedlock.spring.annotation.SchedulerLock; @Profile("!itcase") @Component -@ConditionalOnProperty(prefix = "kop.vorgangmanager", name = { "address" }) +@ConditionalOnProperty(prefix = "ozgcloud.vorgang-manager", name = { "address" }) @Log4j2 class RegistryScheduler { @Autowired @@ -46,8 +46,8 @@ class RegistryScheduler { @Autowired private UserConfigService userConfigService; - @Scheduled(fixedDelayString = "${kop.vorgangmanager.registry.scheduler.fixedDelay:5}", // - initialDelayString = "${kop.vorgangmanager.registry.scheduler.initialDelay:5}", // + @Scheduled(fixedDelayString = "${ozgcloud.vorgang-manager.registry.scheduler.fixedDelay:5}", // + initialDelayString = "${ozgcloud.vorgang-manager.registry.scheduler.initialDelay:5}", // timeUnit = TimeUnit.MINUTES) @SchedulerLock(name = "RegistryScheduler") void register() { diff --git a/vorgang-manager-server/src/main/java/de/ozgcloud/vorgang/registry/RegistryService.java b/vorgang-manager-server/src/main/java/de/ozgcloud/vorgang/registry/RegistryService.java index d97072a66..e2e8475bf 100644 --- a/vorgang-manager-server/src/main/java/de/ozgcloud/vorgang/registry/RegistryService.java +++ b/vorgang-manager-server/src/main/java/de/ozgcloud/vorgang/registry/RegistryService.java @@ -38,6 +38,6 @@ class RegistryService { void registerAddress(List<String> supportedOrganisationsEinheiten, Optional<String> vorgangManagerAddress) { vorgangManagerAddress.ifPresentOrElse(address -> { zufiRemoteService.registerVorgangManager(supportedOrganisationsEinheiten, address); - }, () -> LOG.error("Property kop.vorgangmanager.address not set. Not registering this VorgangsManager")); + }, () -> LOG.error("Property ozgcloud.vorgang-manager.address not set. Not registering this VorgangsManager")); } } diff --git a/vorgang-manager-server/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/vorgang-manager-server/src/main/resources/META-INF/additional-spring-configuration-metadata.json index 0d17886a4..55d5b0ba0 100644 --- a/vorgang-manager-server/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/vorgang-manager-server/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -1,41 +1,36 @@ {"properties": [ { - "name": "pluto.redirect.mail-from", + "name": "ozgcloud.redirect.mail-from", "type": "java.lang.String", "description": "Mail address for forwarding" }, { - "name": "pluto.production", + "name": "ozgcloud.production", "type": "java.lang.String", "description": "Enables/Disables the production mode. (default: false)" }, { - "name": "pluto.forwarding.lninfo.url", + "name": "ozgcloud.forwarding.lninfo.url", "type": "java.lang.String", "description": "Source of landesnetzinfo given as url(http://) or filepath(classpath:)" }, { - "name": "pluto.forwarding.reply-to", + "name": "ozgcloud.forwarding.reply-to", "type": "java.lang.String", "description": "Mail replyTo address for forwarding" }, { - "name": "kop.production", - "type": "java.lang.String", - "description": "Enable production mode" - }, - { - "name": "kop.osi.postfach.scheduler.enabled", + "name": "ozgcloud.osi.postfach.scheduler.enabled", "type": "java.lang.String", "description": "Enable or disable polling of osi postfach for new messages" }, { - "name": "kop.usermanager.url", + "name": "ozgcloud.usermanager.url", "type": "java.lang.String", "description": "Url of the user manager migration endpoint" }, { - "name": "kop.notification.mail-from", + "name": "ozgcloud.notification.mail-from", "type": "java.lang.String", "description": "The sender email address used in notification emails" } diff --git a/vorgang-manager-server/src/test/java/de/ozgcloud/nachrichten/postfach/PostfachMailITCase.java b/vorgang-manager-server/src/test/java/de/ozgcloud/nachrichten/postfach/PostfachMailITCase.java index 85af4f0ad..55c083e8d 100644 --- a/vorgang-manager-server/src/test/java/de/ozgcloud/nachrichten/postfach/PostfachMailITCase.java +++ b/vorgang-manager-server/src/test/java/de/ozgcloud/nachrichten/postfach/PostfachMailITCase.java @@ -65,10 +65,10 @@ import de.ozgcloud.vorgang.files.OzgFile; import io.grpc.stub.StreamObserver; @SpringBootTest(classes = { VorgangManagerServerApplication.class, OsiPostfachProperties.class }, properties = { - "kop.osi.postfach.proxyapi.url=http://localhost/ApiProxy/V1/Message", - "kop.osi.postfach.proxyapi.key=1234", - "kop.osi.postfach.proxyapi.realm=test-realm", - "kop.osi.postfach.notification.mail-from=test@local.host" + "ozgcloud.osi.postfach.proxyapi.url=http://localhost/ApiProxy/V1/Message", + "ozgcloud.osi.postfach.proxyapi.key=1234", + "ozgcloud.osi.postfach.proxyapi.realm=test-realm", + "ozgcloud.osi.postfach.notification.mail-from=test@local.host" }) @WithMockUser @DataITCase diff --git a/vorgang-manager-server/src/test/java/de/ozgcloud/nachrichten/postfach/osi/OsiPostfachApiTestCase.java b/vorgang-manager-server/src/test/java/de/ozgcloud/nachrichten/postfach/osi/OsiPostfachApiTestCase.java index d5498bcb7..a2ddd4604 100644 --- a/vorgang-manager-server/src/test/java/de/ozgcloud/nachrichten/postfach/osi/OsiPostfachApiTestCase.java +++ b/vorgang-manager-server/src/test/java/de/ozgcloud/nachrichten/postfach/osi/OsiPostfachApiTestCase.java @@ -42,10 +42,10 @@ import de.ozgcloud.vorgang.VorgangManagerServerApplication; @SpringBootTest( classes = { VorgangManagerServerApplication.class, OsiPostfachProperties.class }, properties = { - "kop.osi.postfach.proxyapi.url=https://postfach.serviceportal-stage.schleswig-holstein.de/ApiProxy/V1/Message", - "kop.osi.postfach.proxyapi.key=db03d369-438a-4c1a-bcb8-9de951f5ef41", - "kop.osi.postfach.proxyapi.realm=urn:osp:names:realm:stage:sh", - "kop.osi.postfach.scheduler.enabled=false" + "ozgcloud.osi.postfach.proxyapi.url=https://postfach.serviceportal-stage.schleswig-holstein.de/ApiProxy/V1/Message", + "ozgcloud.osi.postfach.proxyapi.key=db03d369-438a-4c1a-bcb8-9de951f5ef41", + "ozgcloud.osi.postfach.proxyapi.realm=urn:osp:names:realm:stage:sh", + "ozgcloud.osi.postfach.scheduler.enabled=false" }) @ITCase class OsiPostfachApiTestCase { diff --git a/vorgang-manager-server/src/test/java/de/ozgcloud/nachrichten/postfach/osi/OsiPostfachRemoteServiceITCase.java b/vorgang-manager-server/src/test/java/de/ozgcloud/nachrichten/postfach/osi/OsiPostfachRemoteServiceITCase.java index 53b0456c3..44365de88 100644 --- a/vorgang-manager-server/src/test/java/de/ozgcloud/nachrichten/postfach/osi/OsiPostfachRemoteServiceITCase.java +++ b/vorgang-manager-server/src/test/java/de/ozgcloud/nachrichten/postfach/osi/OsiPostfachRemoteServiceITCase.java @@ -45,10 +45,10 @@ import de.ozgcloud.nachrichten.postfach.PostfachNachrichtTestFactory; import de.ozgcloud.vorgang.VorgangManagerServerApplication; @SpringBootTest(classes = { VorgangManagerServerApplication.class, OsiPostfachProperties.class }, properties = { - "kop.osi.postfach.proxyapi.url=http://localhost/ApiProxy/V1/Message", - "kop.osi.postfach.proxyapi.key=1234", - "kop.osi.postfach.proxyapi.realm=test-realm", - "kop.osi.postfach.scheduler.enabled=false" + "ozgcloud.osi.postfach.proxyapi.url=http://localhost/ApiProxy/V1/Message", + "ozgcloud.osi.postfach.proxyapi.key=1234", + "ozgcloud.osi.postfach.proxyapi.realm=test-realm", + "ozgcloud.osi.postfach.scheduler.enabled=false" }) @ITCase class OsiPostfachRemoteServiceITCase { -- GitLab