Klasse ResultAction

java.lang.Object
io.jenkins.plugins.analysis.core.model.ResultAction
Alle implementierten Schnittstellen:
Action, HealthReportingAction, ModelObject, Serializable, RunAction2, SimpleBuildStep.LastBuildAction, org.kohsuke.stapler.StaplerProxy

public class ResultAction extends Object implements HealthReportingAction, SimpleBuildStep.LastBuildAction, RunAction2, org.kohsuke.stapler.StaplerProxy, Serializable
Controls the life cycle of the analysis results in a job. This action persists the results of a build and displays a summary on the build page. The actual visualization of the results is defined in the matching summary.jelly file. This action also provides access to the static analysis details: these are rendered using a new IssuesDetail instance.
Autor:
Ullrich Hafner
Siehe auch:
  • Konstruktordetails

    • ResultAction

      public ResultAction(Run<?,?> owner, AnalysisResult result, HealthDescriptor healthDescriptor, String id, String name, Charset charset)
      Creates a new instance of ResultAction.
      Parameter:
      owner - the associated build/run that created the static analysis result
      result - the result of the static analysis run
      healthDescriptor - the health descriptor of the static analysis run
      id - the ID of the results
      name - the optional name of the results
      charset - the charset to use to display source files
    • ResultAction

      public ResultAction(Run<?,?> owner, AnalysisResult result, HealthDescriptor healthDescriptor, String id, String name, Charset charset, TrendChartType trendChartType)
      Creates a new instance of ResultAction.
      Parameter:
      owner - the associated build/run that created the static analysis result
      result - the result of the static analysis run
      healthDescriptor - the health descriptor of the static analysis run
      id - the ID of the results
      name - the optional name of the results
      charset - the charset to use to display source files
      trendChartType - determines if the trend chart will be shown
  • Methodendetails

    • readResolve

      protected Object readResolve()
      Called after de-serialization to retain backward compatibility.
      Gibt zurück:
      this
    • getId

      public String getId()
      Returns the ID (and URL) of this action.
      Gibt zurück:
      the ID
    • getQualityGateResult

      public io.jenkins.plugins.util.QualityGateResult getQualityGateResult()
    • getName

      public String getName()
      Returns the name of the static analysis tool.
      Gibt zurück:
      the ID
    • getOwner

      public Run<?,?> getOwner()
      Returns the associated build/run that created the static analysis result.
      Gibt zurück:
      the run
    • createBuildHistory

      public History createBuildHistory()
      Returns the build history for this action.
      Gibt zurück:
      the history
    • onAttached

      public void onAttached(Run<?,?> r)
      Angegeben von:
      onAttached in Schnittstelle RunAction2
    • onLoad

      public void onLoad(Run<?,?> r)
      Angegeben von:
      onLoad in Schnittstelle RunAction2
    • getDisplayName

      public String getDisplayName()
      Angegeben von:
      getDisplayName in Schnittstelle Action
      Angegeben von:
      getDisplayName in Schnittstelle ModelObject
    • getUrlName

      public String getUrlName()
      Angegeben von:
      getUrlName in Schnittstelle Action
    • getRelativeUrl

      public String getRelativeUrl()
      Returns the URL of this action, relative to the context root of Jenkins.
      Gibt zurück:
      the relative URL, like job/foo/32/analysis/
    • getAbsoluteUrl

      public String getAbsoluteUrl()
      Gets the absolute path to the build from the owner. This is needed for testing due to Run.getAbsoluteUrl() being final and therefore not mockable.
      Gibt zurück:
      the absolute url to the job
    • getBuildHealth

      @CheckForNull public HealthReport getBuildHealth()
      Angegeben von:
      getBuildHealth in Schnittstelle HealthReportingAction
    • getProjectActions

      public Collection<? extends Action> getProjectActions()
      Angegeben von:
      getProjectActions in Schnittstelle SimpleBuildStep.LastBuildAction
    • getResult

      public AnalysisResult getResult()
    • getIconFileName

      public String getIconFileName()
      Angegeben von:
      getIconFileName in Schnittstelle Action
    • equals

      public boolean equals(Object o)
      Setzt außer Kraft:
      equals in Klasse Object
    • hashCode

      public int hashCode()
      Setzt außer Kraft:
      hashCode in Klasse Object
    • hasLargeImage

      public boolean hasLargeImage()
      Returns whether a large image is defined.
      Gibt zurück:
      true if a large image is defined, false otherwise
    • getLargeImageName

      public String getLargeImageName()
      Returns the URL of the 48x48 image used in the build summary.
      Gibt zurück:
      the URL of the image
    • getSmallImageName

      public String getSmallImageName()
      Returns the URL of the 24x24 image used in the build link.
      Gibt zurück:
      the URL of the image
    • getSmallImage

      public String getSmallImage()
      Returns the URL of the 24x24 image used in the build link.
      Gibt zurück:
      the URL of the image
    • getSummaryModel

      public SummaryModel getSummaryModel()
      Returns the model for the summary of the static analysis run. This model is used as input in the 'summary.jelly' view.
      Gibt zurück:
      model to build the summary message on the client side
    • isSuccessful

      public boolean isSuccessful()
      Returns whether the static analysis result is considered successfully with respect to the evaluated quality gates.
      Gibt zurück:
      true if the result is successful, false if the result has been set to Result.UNSTABLE or Result.FAILURE.
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object
    • getLabelProvider

      public StaticAnalysisLabelProvider getLabelProvider()
      Returns the StaticAnalysisLabelProvider for this action.
      Gibt zurück:
      the label provider for this tool
    • getTarget

      public IssuesDetail getTarget()
      Returns the detail view for issues for all Stapler requests.
      Angegeben von:
      getTarget in Schnittstelle org.kohsuke.stapler.StaplerProxy
      Gibt zurück:
      the detail view for issues
    • resetReference

      @JavaScriptMethod public String resetReference()
      Empty method as workaround for Stapler bug: JavaScript method in target object is not found.
      Gibt zurück:
      unused string (since Firefox requires that Ajax calls return something)