Package ninja.utils
Class OverlayedNinjaProperties
- java.lang.Object
-
- ninja.utils.OverlayedNinjaProperties
-
public class OverlayedNinjaProperties extends Object
Helper utility for handling Ninja properties using a simple "overlayed" view of them. Does not modify NinjaProperties in any way. Simply adds an overlay of other possible sources of the same property and helps get the value according to an order of precedence:- currentValue
- systemProperty
- configProperty
- defaultValue
-
-
Constructor Summary
Constructors Constructor Description OverlayedNinjaProperties(NinjaProperties ninjaProperties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
get(String key, String currentValue, String defaultValue)
Boolean
getBoolean(String key, Boolean currentValue, Boolean defaultValue)
Integer
getInteger(String key, Integer currentValue, Integer defaultValue)
Long
getLong(String key, Long currentValue, Long defaultValue)
URI
getURI(String key, URI currentValue, URI defaultValue)
-
-
-
Constructor Detail
-
OverlayedNinjaProperties
@Inject public OverlayedNinjaProperties(NinjaProperties ninjaProperties)
-
-