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

Marker interface for things with actions

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core

      Actionable involves both concrete implementation (including the instance field actions, set to an empty list whenever actions are retrieved) which may not be appropriate for all cases, and implements some interfaces related to model objects which are also not appropriate for all cases. (For example, it leaves SearchItem.getSearchUrl() abstract.)

      It would be desirable to have a new API interface (implemented by Actionable) which cleanly represents the ability of an object to be decorated by actions: principally getAction(Class), but also getAllActions() and getActions(Class). An extended interface could describe the ability to have an action list be externally mutated (addAction(Action), replaceAction(Action), and perhaps a remove method to satisfy the occasional caller currently mutating the return value of getActions()).

      TransientActionFactory could perhaps restrict its type parameter to the new (base, immutable) interface, and/or introduce some helper methods for searching factories.

            Unassigned Unassigned
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: