-
Type: Improvement
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Component/s: Configuration
-
Tags:
-
Upgrade notes:
-
Sprint:nxcore 11.1.3
-
Story Points:5
We want to add new API on ConfigurationService to handle primitive like types.
API to introduce would be:
- Integer getInteger(String key) (TBC)
- int getInteger(String key, int defaultValue) (TBC)
- Long getLong(String key)
- long getLong(String key, long defaultValue)
- Boolean getBoolean(String key)
- boolean getBoolean(String key, boolean defaultValue)
- Duration getDuration(String key)
- Duration getDuration(String key, Duration defaultValue)
- String getString(String key)
- String getString(String key, String defaultValue)
Fallback on defaultValue will be done if the property doesn't exist or it it's empty.
Duration handling should follow what was done in NXP-25402.
We want to hunt every usage in Nuxeo Platform to replace them by the appropriate API.
We also want to deprecate isBooleanPropertyTrue and isBooleanPropertyFalse because their usage is error prone. Be careful about their implementation and their usage to be iso-functional, because true API doesn't have the exact same behavior than false API.