aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/gv/egiz/moazs/config
AgeCommit message (Collapse)AuthorFilesLines
2019-05-16Refactor: Merge Converter, Validator, and Merger into UtilChristof Rabensteiner1-6/+2
- Reason: All three classes opertate with the same data type, have the same clients, and have the same reasons for change. - Makes code in client more readable as it reduces number of dependencies.
2019-05-16Refactor and Test ConfigProfileGeneratorChristof Rabensteiner2-33/+43
Refactor - Add Builder to ConfigProfileGenerator. Reason: Constructor had too many arguments. - Move Conversion from Map to Config from ConfigProfileGenerator into dedicated 'ConvertMapToConfig' Class; Reason: I expect additional configuration properties and I don't want those changes to affect the ConfigProfileGenerator (or it's test cases) - Move Access to Spring's env into facade to simplify ConfigProfileGenerator.
2019-05-15Move Services / Clients To Dedicated PackagesChristof Rabensteiner1-4/+4
2019-05-15Handle Config Related Edge Cases in Augmenter & ProfileGeneratorChristof Rabensteiner1-1/+14
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.
2019-05-15WIP: Generate Map of Config Profiles from Spring EnvironmentChristof Rabensteiner1-18/+7
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.
2019-05-14Implement Per-Field-Overriding of Configuration in AugmenterChristof Rabensteiner1-0/+31
- Rewrite DeliveryRequestAugmenter to allow per-field-overriding of configuration parameters and add test suite. - Mzs schema change: Move DeliveryRequest/Server into DeliveryRequest/Config; Reason: DeliveryRequest/Config contains all parameters exclusively needed by moazs to execute the delivery request. The msg's server url belongs to this set of parameters. - WIP: Add prototype implementation of MsgClient and move MsgClient to dedicated package. - Refactor: move TnvzClient to dedicated package.
2019-05-13Refactor RedisConfig: Use Diamond OperatorChristof Rabensteiner1-4/+1
2019-05-13Refactor: Remove Unused MembersChristof Rabensteiner1-12/+2
2019-05-10Refactor: Eliminate Non-Compliant HashMap InitializationChristof Rabensteiner1-8/+8
2019-05-10Fix Hardcoded WSDL locationsChristof Rabensteiner1-2/+7
2019-05-09Fix: Enable ApacheCXF's Automated Schema ValidationChristof Rabensteiner1-0/+7
Problem: Apache CXF does not validate incoming mzs:DeliveryRequests automatically. Per default, validation is off (performs better). However, (1) we need to validate incoming requests, and (2) automated CXF validation requires less maintenance and is expected to be more stable than manual validation. Solution: - Add @SchemaValidation annotation to @Service. - Endpoint Configuration: set WsdlLocation and ServiceName (needed to prevent parser errors; see [1]). Without those, CXF validates against generated classes and not against the WSDL spec, and generated classes do not contain format restrictions. Add a testcase with an invalid delivery request ("rejectBothProfile- AndCorporateBody") to ensure that the validator works. [1] https://stackoverflow.com/questions/2231779/cxf-and-validation-schema-restrictions-ignored
2019-05-08Refactor: Consolidate Schema-Related ComponentsChristof Rabensteiner1-3/+2
2019-05-08Fix Namespace Prefixes in Marshaled Messages (msg: instead of ns#:)Christof Rabensteiner1-5/+47
- Implement own NamespacePrefixMapper that maps prefixes depending on whether a msg or a mzs object is being marshaled. - Namespaces are not hardcoded but extracted from jaxb's generated sources (somewhat indirect, can be considered a hack, but there's no public API to extract namespaces)
2019-05-06Change Package Namespaces of JAXB Generated SourcesChristof Rabensteiner1-6/+4
- Reason: Improves readability and makes import statetemens shorter and more consistent
2019-04-30Add Optional mzs:DeliveryRequest/Config & Validate / Augment ItChristof Rabensteiner1-6/+0
Add Optional "Config" to MZS Schema: - Add mzs:DeliveryRequest/Config Element with a "PerformQueryPersonRequest" node - The config element contains parameters that are interpreted by moa-zs and not forwarded to the ZD - The boolean PerformQueryPersonRequest tells moa-zs if moa-zs should perform a QueryPersonRequest towards the TNVZ. - If config is missing, moa-zs augments the delivery request with parameters from the app's configuartion or the default configuartion Other Changes: - Validate and augment incoming requests with the DeliveryPreprocessor. - Add stub for TlnvzClient. - Remove some leftover ObjectFactory imports (because of the builder they are not needed anymore) Fixes - Fixed incorrect API usage of Messageformat.format: format string needs an index. pom.xml - Add Hamcrest Dependency (for writing more expressive tests) - Add copy constructor to JAXB Builder Testing - Test validation of incoming request - Refactor testcases to improve readability
2019-04-17Refactor: Move Configs to config PackageChristof Rabensteiner3-0/+107