Skip to content

Teragrep Configuration Wrapper for com.typesafe.config

License

AGPL-3.0, Unknown licenses found

Licenses found

AGPL-3.0
LICENSE
Unknown
license-header
Notifications You must be signed in to change notification settings

teragrep/cnf_02

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Teragrep Configuration Wrapper for Typesafe Config

CNF-02 is a library that provides immutable configuration for Typesafe Config for projects using Java. Typesafe Config will be converted to CNF-01's Configuration interface, so it is wise to read through its documentation as well. CNF-02 has CNF-01 as a dependency, so it provides all the functionality that it has.

The goal is to have CNF-02 as an extension of CNF-01 with the added third party dependency of Typesafe Config. This ensures that if a project does not use Typesafe for configuration, it doesn’t have to be added as a dependency when migrating to use the CNF-01 library.

Features

  • Converts Typesafe Config to CNF-01 interface.

  • Provides all functionalities from CNF-01 with a transitive dependency to the component.

Limitations

CNF-01’s interface converts to a String to String map of configurations. For this reason, Lists used in Typesafe Config are represented as Strings. The resulting List Strings are in Json format and can be parsed with Jakarta or Gson for example.

Maps are represented individually as key-value pairs like in Typesafe Config.

Null values are not supported. Keys that have null values are not present in the resulting Map.

How to use

See CNF-01’s documentation for using the library.

Example for using TypesafeConfiguration:

// One way of initializing Typesafe Config
Config config = ConfigFactory.parseFile("file/path");

// Converting Config to CNF-01 Map.
Configuration configuration = new TypesafeConfiguration(config);
Map<String, String> configurationMap = configuration.asMap();

Contributing

You can involve yourself with our project by opening an issue or submitting a pull request.

Contribution requirements:

  1. All changes must be accompanied by a new or changed test. If you think testing is not required in your pull request, include a sufficient explanation as why you think so.

  2. Security checks must pass

  3. Pull requests must align with the principles and values of extreme programming.

  4. Pull requests must follow the principles of Object Thinking and Elegant Objects (EO).

Read more in our Contributing Guideline.

Contributor License Agreement

Contributors must sign Teragrep Contributor License Agreement before a pull request is accepted to organization’s repositories.

You need to submit the CLA only once. After submitting the CLA you can contribute to all Teragrep’s repositories.

About

Teragrep Configuration Wrapper for com.typesafe.config

Resources

License

AGPL-3.0, Unknown licenses found

Licenses found

AGPL-3.0
LICENSE
Unknown
license-header

Stars

Watchers

Forks

Packages

No packages published

Languages