Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-62572

Allow getting a downloadable by class

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      Jenkins 2.244

      Description

      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.

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            Assignee:
            zastai Tim Van Holder
            Reporter:
            zastai Tim Van Holder
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: