Hiera Provider for Java Preferences API delivers a easy to use backend for Puppetlabs Hiera
With maven dependency:
<dependency>
<groupId>pl.wavesoftware</groupId>
<artifactId>preferences-hiera</artifactId>
<version>0.3.2</version>
</dependency>
If using as a plugin into Application Server or standalone application set system properties as soon as you can:
// Inside a plugin
HieraPreferencesFactory.activate();
// Aplications use default Java syntax
Preferences prefs = Preferences.userRoot();
boolean production = prefs.getBoolean("production", false);
If using hiera preferences inside a Java EE Application user rather direct aproch:
Preferences prefs = HieraPreferencesFactory.createUserRoot();
boolean production = prefs.getBoolean("production", false);
- more bug fixes
- Bug fixes for transient and miltithreaded maven build
- Fallback to standard Java preferences for method not supported by hiera
- Caching execution of hiera command line tool
- Bugfixes
- Major rewrite
- More test
- CI support
- First version