Package io.jenkins.plugins.util
Class JobAction<T extends BuildAction<?>>
- java.lang.Object
-
- io.jenkins.plugins.util.JobAction<T>
-
- 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. aBuildAction
with a corresponding result). This action also is responsible to render the historical trend via its associated 'floatingBox.jelly' view.- Author:
- Ullrich Hafner
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doIndex(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
Redirects the index page to the last result.protected Class<T>
getBuildActionClass()
Optional<T>
getLatestAction()
Returns the latest results for this job.Job<?,?>
getOwner()
Returns the job this action belongs to.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface hudson.model.Action
getDisplayName, getIconFileName, getUrlName
-
-
-
-
Method Detail
-
getOwner
public Job<?,?> getOwner()
Returns the job this action belongs to.- Returns:
- the job
-
doIndex
public void doIndex(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response) throws IOException
Redirects the index page to the last result.- Parameters:
request
- Stapler requestresponse
- Stapler response- Throws:
IOException
- in case of an error
-
-