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
Constructors Constructor Description ScanMode()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static 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
getDisplayName()
Human readable name to display.String
getFullUrl()
The full url from the root of Jenkins.ScanOnDemandBaseAction
getParent()
Finds theScanOnDemandBaseAction
in the ancestor path.abstract String
getUrlName()
The short relative url name of this scan mode.boolean
hasAnyRun(Job job)
If there is any run in the job matching this scan mode's criteria.void
setAsDefault()
Sets this scan mode as the default for this user on future page visits.
-
-
-
Method Detail
-
hasAnyRun
public boolean hasAnyRun(Job job)
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
@NonNull public abstract String 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
@CheckForNull public String getFullUrl()
The full url from the root of Jenkins.- Returns:
- the full url
- See Also:
ScanOnDemandBaseAction.getFullUrl()
-
getDisplayName
@NonNull public abstract String 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
@NonNull public ScanOnDemandBaseAction 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
public static List<ScanOnDemandBaseAction.ScanMode> all()
Provides the lookup list of all registeredScanOnDemandBaseAction.ScanMode
s.- Returns:
- the list of available modes.
-
-