diff options
author | Christof Rabensteiner <christof.rabensteiner@iaik.tugraz.at> | 2019-05-15 14:55:09 +0200 |
---|---|---|
committer | Christof Rabensteiner <christof.rabensteiner@iaik.tugraz.at> | 2019-05-15 14:55:09 +0200 |
commit | 6959228c5c557df0204a2902807b35d90063b600 (patch) | |
tree | 1c32e2b63d0fd8c290d81b569470eea2c7fd5c1a /src/main/java/at/gv/egiz/moazs/preprocess/ConfigProfileValidator.java | |
parent | cb95ee0650d3bbc3fe619af0a687f09d39a0a07f (diff) | |
download | moa-zs-6959228c5c557df0204a2902807b35d90063b600.tar.gz moa-zs-6959228c5c557df0204a2902807b35d90063b600.tar.bz2 moa-zs-6959228c5c557df0204a2902807b35d90063b600.zip |
Handle Config Related Edge Cases in Augmenter & ProfileGenerator
ConfigProfileGenerator:
- Cancel startup if default Config profile is incomplete.
- Add property flag
'verify-completeness-of-default-delivery-request-configuration',
which allows admin to disable completeness check. In that case, just
log a warning if the default profile is incomplete.
Augmenter:
- Ensure that after merging the config is complete (or throw an
exception otherwise).
- Refactor: Move ConfigProfileValidator from ConfigProfileGenerator to
dedicated "ConfigProfileValidator" class; Reason: Augmenter needs to
check completness of at-runtime-compiled configuration.
- Refactor: Rewrote code for better readability.
Others
- NPE Fix in ConfigProfileMerger: If FallbackConfigProfile/Server is
empty, use PrimaryProfile/Server.
Diffstat (limited to 'src/main/java/at/gv/egiz/moazs/preprocess/ConfigProfileValidator.java')
-rw-r--r-- | src/main/java/at/gv/egiz/moazs/preprocess/ConfigProfileValidator.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main/java/at/gv/egiz/moazs/preprocess/ConfigProfileValidator.java b/src/main/java/at/gv/egiz/moazs/preprocess/ConfigProfileValidator.java new file mode 100644 index 0000000..08d8aea --- /dev/null +++ b/src/main/java/at/gv/egiz/moazs/preprocess/ConfigProfileValidator.java @@ -0,0 +1,17 @@ +package at.gv.egiz.moazs.preprocess; + +import at.gv.zustellung.app2mzs.xsd.ConfigType; +import org.springframework.stereotype.Component; + +@Component +public class ConfigProfileValidator { + + public boolean isComplete(ConfigType profile) { + //TODO: add check fo x509 certificate + return profile != null + && profile.isPerformQueryPersonRequest() != null + && profile.getServer() != null + && profile.getServer().getZUSEUrlID() != null; + } + +} |