Class JobAction<T extends BuildAction<?>>

  • Type Parameters:
    T - type of the results
    All Implemented Interfaces:
    Action, ModelObject

    public abstract class JobAction<T extends BuildAction<?>>
    extends Object
    implements Action
    A job action displays a link on the side panel of a job that refers to the last build that contains results (i.e. a BuildAction with a corresponding result). This action also is responsible to render the historical trend via its associated 'floatingBox.jelly' view.
    Ullrich Hafner
    • Constructor Detail

      • JobAction

        protected JobAction​(Job<?,​?> owner,
                            Class<T> buildActionClass)
        Creates a new instance of JobAction.
        owner - the job that owns this action
        buildActionClass - the type of the action to find
    • Method Detail

      • getOwner

        public Job<?,​?> getOwner()
        Returns the job this action belongs to.
        the job
      • getBuildActionClass

        protected Class<T> getBuildActionClass()
      • doIndex

        public void doIndex​(org.kohsuke.stapler.StaplerRequest request,
                            org.kohsuke.stapler.StaplerResponse response)
                     throws IOException
        Redirects the index page to the last result.
        request - Stapler request
        response - Stapler response
        IOException - in case of an error
      • getLatestAction

        public Optional<T> getLatestAction()
        Returns the latest results for this job.
        the latest results (if available)