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.
See Also:
  • Constructor Details

    • ScanMode

      public ScanMode()
  • Method Details

    • hasAnyRun

      public boolean hasAnyRun(Job job)
      If there is any run in the job matching this scan mode's criteria. Default implementation is getRuns(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 the ScanOnDemandBaseAction in the ancestor path. Throws IllegalStateException if we are not in the request scope and Stapler.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 ancestor
      request - StaplerRequest
      response - 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 registered ScanOnDemandBaseAction.ScanModes.
      Returns:
      the list of available modes.