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);
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.
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.
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);