• Félix Olart's avatar
    Implemented read of durations in configuration file. · 7d37586c
    Félix Olart authored
    You can now indicate a unit along with the value for a duration parameter in the configuration file.
    Supported units: ms, s, min, h, d, m, y.
    Times are returned in ms.
    Parameter string must match the following regex: "([0-9]+)(|ms|s|min|h|d|m|y)"
    
    We decided to implement three duration types in order to maintain compatibility with current configuration file (which does not indicate units after the value).
    Indeed, all duration values are currently indicated in milliseconds, seconds or minutes.
    
    Also added:
    * A getUnit() method in ConfigValue which indicates the unit of the parameter and is added in the documentation of the parameter of the configuration file.
    * BC_ASSERT_THROW macro to test thrown exception.
    * Unit information in .conf file and in xwiki documentation.
    * Unit tests for this new feature.
    7d37586c