Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Configurations

Diwischek edited this page Nov 25, 2018 · 27 revisions

Home


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.

![Alt text](./generate json configurations with the builder)

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

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.

Csv Calls

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.

Excel Calls

The xlsx package contains the Configuration
for XlsxCall class. It extends ListCall and uses uses the library poi .

It only contains some test configurations


fluentcodes - elastic objects - mvn repository



                  

Clone this wiki locally