Class ScanOnDemandBaseAction.ScanMode
java.lang.Object
com.sonyericsson.jenkins.plugins.bfa.sod.ScanOnDemandBaseAction.ScanMode
- All Implemented Interfaces:
ExtensionPoint
- Direct Known Subclasses:
ScanOnDemandBaseAction.AllBuilds
,ScanOnDemandBaseAction.NonScanned
- Enclosing class:
- ScanOnDemandBaseAction
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public abstract static class ScanOnDemandBaseAction.ScanMode
extends Object
implements ExtensionPoint
Represents the different scan modes that can be used to re-scan the builds of a Job.
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<ScanOnDemandBaseAction.ScanMode>
all()
Provides the lookup list of all registeredScanOnDemandBaseAction.ScanMode
s.void
doPerformScan
(ScanOnDemandBaseAction action, org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response) Submit method for running build scan.abstract String
Human readable name to display.The full url from the root of Jenkins.Finds theScanOnDemandBaseAction
in the ancestor path.abstract String
The short relative url name of this scan mode.boolean
If there is any run in the job matching this scan mode's criteria.void
Sets this scan mode as the default for this user on future page visits.
-
Constructor Details
-
ScanMode
public ScanMode()
-
-
Method Details
-
hasAnyRun
If there is any run in the job matching this scan mode's criteria. Default implementation isgetRuns(Job)
.hasNext()
- Parameters:
job
- the job to check- Returns:
- true if so.
-
getUrlName
The short relative url name of this scan mode. Also used as a short identifier of the scan mode.- Returns:
- the url name
-
getFullUrl
The full url from the root of Jenkins.- Returns:
- the full url
- See Also:
-
ScanOnDemandBaseAction.getFullUrl()
-
getDisplayName
Human readable name to display.- Returns:
- the name
-
setAsDefault
public void setAsDefault()Sets this scan mode as the default for this user on future page visits. -
getParent
Finds theScanOnDemandBaseAction
in the ancestor path. ThrowsIllegalStateException
if we are not in the request scope andStapler.getCurrentRequest()
returns null.- Returns:
- the ancestor action
-
doPerformScan
public void doPerformScan(@AncestorInPath ScanOnDemandBaseAction action, org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response) throws javax.servlet.ServletException, IOException, InterruptedException Submit method for running build scan.- Parameters:
action
- the action we have as an ancestorrequest
- StaplerRequestresponse
- StaplerResponse- Throws:
javax.servlet.ServletException
- if something unfortunate happens.IOException
- if something unfortunate happens.InterruptedException
- if something unfortunate happens.
-
all
Provides the lookup list of all registeredScanOnDemandBaseAction.ScanMode
s.- Returns:
- the list of available modes.
-