-
Improvement
-
Resolution: Fixed
-
Minor
-
-
Jenkins 2.244
When implementing a DownloadService.Downloadable, it wants an id, a url and an interval.
The url defaults to id + '.json', and the interval has a suitable default too.
For the id, two methods of setting it are provided: as a plain string, or a class (and the default constructor uses the implementing class). In case a class is given, its name is transformed into an id.
However, when using Downloadable.get(), you can only use a string to provide the id of the instance to get.
For symmetry (and to avoid having to duplicate the specific class-to-ID mapping, which is NOT part of the API documentation), it would be good to have an overload taking a Class.
Or alternatively, provide a static method on Downloadable to map a class to an id.