public class ScanOnDemandBaseAction extends Object implements Action
Modifier and Type | Class and Description |
---|---|
static class |
ScanOnDemandBaseAction.AllBuilds
ScanMode that re-scans all builds regardless if they have been scanned before or not.
|
static class |
ScanOnDemandBaseAction.NonScanned
ScanMode that scans only previously non scanned builds.
|
static class |
ScanOnDemandBaseAction.ScanMode
Represents the different scan modes that can be used to re-scan the builds of a Job.
|
Constructor and Description |
---|
ScanOnDemandBaseAction(Job project)
SODBaseAction constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
checkPermission()
Checks if the current user has
Item.CONFIGURE or Item.BUILD permission. |
void |
doPerformScan(org.kohsuke.stapler.StaplerRequest request,
org.kohsuke.stapler.StaplerResponse response)
Shortcut method to
getDefault() .ScanOnDemandBaseAction.ScanMode.doPerformScan(ScanOnDemandBaseAction, StaplerRequest, StaplerResponse)
If the user clicks on scan on the default scanmode page. |
ScanOnDemandBaseAction.ScanMode |
getDefault()
Finds the user's default
ScanOnDemandBaseAction.ScanMode . |
String |
getDisplayName() |
Object |
getDynamic(String url)
Stapler function to enable 'scan-on-demand/all' etc.
|
String |
getIconFileName() |
ScanOnDemandBaseAction.ScanMode |
getMode(String url)
Finds the mode with the provided url as returned by
ScanOnDemandBaseAction.ScanMode.getUrlName() . |
Job<?,?> |
getProject()
Returns the project.
|
String |
getUrlName() |
boolean |
hasPermission()
Checks if the current user has
Item.CONFIGURE or Item.BUILD permission. |
void |
removeRunActions(hudson.matrix.MatrixBuild build)
Method for remove matrix run actions.
|
public ScanOnDemandBaseAction(Job project)
project
- current project.public String getIconFileName()
getIconFileName
in interface Action
public String getDisplayName()
getDisplayName
in interface Action
getDisplayName
in interface ModelObject
public String getUrlName()
getUrlName
in interface Action
public boolean hasPermission()
Item.CONFIGURE
or Item.BUILD
permission.public void checkPermission()
Item.CONFIGURE
or Item.BUILD
permission.public final Job<?,?> getProject()
public void removeRunActions(hudson.matrix.MatrixBuild build)
build
- the MatrixBuild.public void doPerformScan(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response) throws javax.servlet.ServletException, InterruptedException, IOException
getDefault()
.ScanOnDemandBaseAction.ScanMode.doPerformScan(ScanOnDemandBaseAction, StaplerRequest, StaplerResponse)
If the user clicks on scan on the default scanmode page.request
- the requestresponse
- the responsejavax.servlet.ServletException
- if soInterruptedException
- if soIOException
- if sopublic ScanOnDemandBaseAction.ScanMode getDefault()
ScanOnDemandBaseAction.ScanMode
.
If no selection is found in the session, or not in the request scope then ScanOnDemandBaseAction.NonScanned
is returned.public Object getDynamic(String url)
url
- the scan modeScanOnDemandBaseAction.ScanMode
public ScanOnDemandBaseAction.ScanMode getMode(String url)
ScanOnDemandBaseAction.ScanMode.getUrlName()
.url
- the url to matchCopyright © 2016–2019. All rights reserved.