Design Principal:
1. Split control flow with data config.
2. Configurable in control flow.
3. Extensible in data config.
4. Multi version data support.
Components:
Pipe Filter:
Cacher: Cache the result config if needed.
VersionSelector: Select appropriate version handler to deal with configs.
DataVersionSelector: Decide which version handler to process the request according to data version.
VersionHandler: Process request with current version logic
Assembler: Assemble the configs and produce the “Hierarchy“.
Assemble rule: Concrete rule/strategy to assemble configs. e.g. rule to assemble midInfo.
Executor: Execute config merge logic and produce result config according to “hierarchy“ and “configs“.
executor instance: Concrete executor instance to bind with concrete assemblerRule.
Validator: Validate the result config and build error when needed.
Data:
Hierarchy: Define and store relationship of related configs.
Configs: Define and store all kinds of config. e.g. acquirer-setting, merchant-setting, organization-setting, company-setting, store-setting, application-setting, walletAccount-setting.