Improve the handling of multivalued config items

Description

Currently there is a weird bit of inconsistency in the way multi-valued config items are handled. It is not possible to know if an item has no values or is undefined in the way it is implemented.

Changing things to work like so makes the most sense:

  • Access some named configuration values as an array of strings.
    * There are 2 ways this is indicated in the system:
    * 1) The name is the base name. name + ".count" must be defined to be a positive integer - how many are defined. name + "." + i (1..count) must be defined to be the values.
    * 2) A comma delimited list of values: name=val1,val2,val3
    * If count is 0 or the value is empty then an empty string array is the resulting return value.
    * Null is returned ONLY in the case the value cannot be found at all.
    *
    * @param name
    * The configuration value name base.
    * @return The configuration value with this name, empty array if no values or count=0, OR null if config name is not found.
    */
    String[] getStrings(String name);

Attachments

1

Activity

Show:

Neal Caidin March 14, 2013 at 2:28 PM

From CLE Release team meeting: since this has been in trunk and no complaints yet it is probably fine. For explicit test create a course site, create a project site, make sites joinable.

Hudson CI Server March 6, 2013 at 3:18 PM

Integrated in kernel-trunk #605 (See http://builds.sakaiproject.org:8080/job/kernel-trunk/605/)

Result = SUCCESS

Aaron Zeckoski March 6, 2013 at 9:31 AM

Test plan note: there isn't really a way to test this other than general regression testing that verifies that things are generally still working. The unit tests here are pretty complete.

Aaron Zeckoski March 6, 2013 at 9:30 AM

Committed to trunk after review

Sam Ottenhoff March 6, 2013 at 9:23 AM

This looks good to me. Thanks.

Fixed

Details

Priority

Affects versions

Fix versions

Components

Assignee

Reporter

Created March 6, 2013 at 8:28 AM
Updated April 25, 2018 at 3:19 PM
Resolved March 6, 2013 at 9:30 AM