Task #476
closedConfigurationService - support collections
100%
Description
A standard requirement is the ability to write a list of values into the configuration. The configuration item usually looks like that:
config=item1,item2,item3
It would be nice to extend the ConfigurationService with a method like (it's just a suggestion)
List<String> getValues(String key, List<String> default);
Things to consider are whether to allow custom separators and whether to trim the resulting items (so this would be also legal "config=item1, item2, item3"). Or maybe don't put it into the ConfigurationService and create a custom object for this kind of operations.
Related issues
Updated by Radek Tomiška almost 7 years ago
- Category set to Configuration
- Assignee set to Radek Tomiška
- Target version set to Diamond (7.4.0)
Updated by Radek Tomiška over 6 years ago
- Related to Feature #780: Path with resources - support multiple locations added
Updated by Radek Tomiška over 6 years ago
- Status changed from New to Needs feedback
- Assignee changed from Radek Tomiška to Vít Švanda
- Target version set to Forsterite (7.6.0)
- % Done changed from 0 to 90
I've added support for collection to ConfigurationService. Values are splited by default ',' separator and are trimmed automatically (default parameters can be configured / parametrized in future, if needed). Unit tests, javadoc added.
Commit:
https://github.com/bcvsolutions/CzechIdMng/commit/ccfde8d183ec8930afc08f24681ee44b9543e7e9
Could you do a review pls?
Updated by Vít Švanda over 6 years ago
- Status changed from Needs feedback to Closed
- Assignee changed from Vít Švanda to Radek Tomiška
- % Done changed from 90 to 100
I did review and it looks nice.