This PR integrates the new config module into all other modules and applies some minor changes to the config module.
Summary of changes:
Use UTF-8 when reading/writing JSON config files
JSONObjects are only once converted into internal config classes and not with every getter call. This allows the state of the config classes to be maintained within the Config object. Thus, a Config object can now be shared between different classes to get and change config options.
Added ConfigObject which can be used as generic container for module-specific config classes (e.g., to manage format options in ReadOptions and WriteOptions)
Added @SerializableConfig annotation to confgure the JSON key for config classes
Adapted all config classes in the existing modules to use the new config module
Added @ConfigOption annotation to inject a Config object into the CLI commands
Adapted all CLI commands to consider the options from a config file provided through the new --config-file parameter. The following rules are applied:
Settings provided through command-line parameters have the highest priority and always take precedence.
If a config file is provided, the settings are taken from the config file unless they are overridden by command-line parameters. A command-line parameter must have been explicitly set to override the config file. Default values of command-line parameters do not override the config file.
If neither command-line paramaters nor a config file are provided, the default settings as defined for the different CLI commands are applied.
Some config file options are still missing in this PR, for example, options to define database connections or general options such as the log level to use. These options will be added later.
This PR integrates the new config module into all other modules and applies some minor changes to the config module.
Summary of changes:
Config
object. Thus, aConfig
object can now be shared between different classes to get and change config options.ConfigObject
which can be used as generic container for module-specific config classes (e.g., to manage format options inReadOptions
andWriteOptions
)@SerializableConfig
annotation to confgure the JSON key for config classes@ConfigOption
annotation to inject aConfig
object into the CLI commands--config-file
parameter. The following rules are applied:Some config file options are still missing in this PR, for example, options to define database connections or general options such as the log level to use. These options will be added later.