aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/gv/egiz/moazs/config
diff options
context:
space:
mode:
authorChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-05-15 06:41:15 +0200
committerChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-05-15 06:41:15 +0200
commite70ec39488c0688d8144fa529d58d60ae9564fbd (patch)
tree07ef8e905d56b5ab2142f7a787d98317debcb38d /src/main/java/at/gv/egiz/moazs/config
parent1c252d7fc336831188c628ecdd39cd1b84b0cada (diff)
downloadmoa-zs-e70ec39488c0688d8144fa529d58d60ae9564fbd.tar.gz
moa-zs-e70ec39488c0688d8144fa529d58d60ae9564fbd.tar.bz2
moa-zs-e70ec39488c0688d8144fa529d58d60ae9564fbd.zip
WIP: Generate Map of Config Profiles from Spring Environment
Augmenter - Replace default Config Profile with map of Config Profiles. Now, Augmenter can choose a config profile at runtime and augment it. - Move Augmenter to sub package. WIP - Implement ConfigProfileGenerator, which retrieves Config profiles from Spring Environment and returns an easy-to-use map with profiles that is keyed with profile id's. - Replace application.properties with application.yaml. - Remove Augmenter test cases: They need to be adapted.
Diffstat (limited to 'src/main/java/at/gv/egiz/moazs/config')
-rw-r--r--src/main/java/at/gv/egiz/moazs/config/DeliveryRequestAugmenterConfig.java25
1 files changed, 7 insertions, 18 deletions
diff --git a/src/main/java/at/gv/egiz/moazs/config/DeliveryRequestAugmenterConfig.java b/src/main/java/at/gv/egiz/moazs/config/DeliveryRequestAugmenterConfig.java
index 93615c4..d5b52c5 100644
--- a/src/main/java/at/gv/egiz/moazs/config/DeliveryRequestAugmenterConfig.java
+++ b/src/main/java/at/gv/egiz/moazs/config/DeliveryRequestAugmenterConfig.java
@@ -1,31 +1,20 @@
package at.gv.egiz.moazs.config;
+import at.gv.egiz.moazs.preprocess.ConfigProfileGenerator;
import at.gv.zustellung.app2mzs.xsd.ConfigType;
-import org.springframework.beans.factory.annotation.Value;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import static at.gv.zustellung.app2mzs.xsd.ConfigType.configTypeBuilder;
-import static at.gv.zustellung.app2mzs.xsd.ServerType.serverTypeBuilder;
+import java.util.Map;
@Configuration
public class DeliveryRequestAugmenterConfig {
-
- @Value("${msg.default.url}")
- private String zuseUrlID;
-
@Bean
- public ConfigType defaultMzsConfig() {
-
- var server = serverTypeBuilder()
- .withZUSEUrlID(zuseUrlID)
- .withX509(null) //todo load cert!
- .build();
-
- return configTypeBuilder()
- .withPerformQueryPersonRequest(false)
- .withServer(server)
- .build();
+ @Autowired
+ Map<String, ConfigType> deliveryRequestConfigs(ConfigProfileGenerator generator) {
+ return generator.generate();
}
+
}