Class ScanOnDemandBaseAction.ScanMode

    • Constructor Detail

      • ScanMode

        public ScanMode()
    • Method Detail

      • 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.
      • 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.