-
Notifications
You must be signed in to change notification settings - Fork 1
Configurations
Core of Elastic Objects is the configuration cache. It contains the knowledge of an application about
The Configuration cache is read from json in the class path.
of objects and external sources to retrieve or store.
When it's initated it read all json files in the classpath which have the same name as the configuration class. When intialize the ModelConfig.class it reads all ModelsConfig.json files provide as immutable map of configuration objects.
Each entry of the json files is identical with the specification entries in the sheets of the build process. Json is a propriate format for computers. Sheets are a propriate format for humans.

In an application the cache can be included as a singelton as in the spring boot example or just static as in the tests.
A certain configution class could be accessed via find
Object config = configsCache.find(ModelConfig.class, "BasicTest");
in an application.
For configurations in the elastic-objects there are typed methods like findModel
ModelConfig config = configsCache.findModel(BasicTest.class);
For the class mapping of data the cache automatically reads all json files named
- ModelConfig.json: ModelConfig offers basic access to java objects depending of its type.
- FieldConfig.json: FieldConfig allows the models to share common valid fields configurations like e.g. "description".
Both configurations has no related calls.
Core Calls
The core package offers the following config classes and corresponding configurations.
A call will usually be instantiated with the key of a configuration. Not all classes have a json file in the main package. Not all configurations have a call.
- HostConfig.json: Host configuration with protocol, login and password. Base for extension of other configurations.
- FileConfig.json: Configuratons for the FileCall for text files with path extends HostConfig.
- JsonConfig.json: Configurations for JsonCall extends FileConfig.
- TemplateConfig.json: Configurations for the TemplateCall class is an extension of FileConfigs.
- ScsConfig.json: Configurations for the ScsCall class is an extension of ListCall is for simple character separated files.
-
ValueConfig.json:
Configurations
for ValueCall class. Just sets a value. Should demonstrate how to write specific call classes.
The csv package contains the
Configuration
for
CsvCall
class. It extends ListCall and is similar to ScsCall beside it uses the library openCsv.
It only contains some test configurations.
The xlsx package contains the
Configuration
for
XlsxCall
class. It extends ListCall and uses uses the library poi .
It only contains some test configurations