Package io.jenkins.plugins.explain_error
Class ErrorExplanationAction
java.lang.Object
io.jenkins.plugins.explain_error.ErrorExplanationAction
- All Implemented Interfaces:
Action,ModelObject,RunAction2
@ExportedBean(defaultVisibility=999)
public class ErrorExplanationAction
extends Object
implements RunAction2
Build action to store and display error explanations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetApi()The heading for this explanation: its title when there is one, with the provider's name.intThe headings around the explanation, in the explanation's own language.Provider and model for the line under the explanation, leaving out what is not known.intReturns the number of the earlier build whose explanation was reused for this build because it failed the same way, or0if the explanation was generated for this build.The address of the explanation this one was taken over from, relative to the Jenkins root, ornullwhen it was not reused or that build no longer exists.Run<?, ?> getRun()Get the associated run.The summary as HTML for the panel: escaped, with backtick spans as<code>.The summary for the build's own page: all of it when it is short, otherwise cut at the end of a sentence, or failing that at a word.longgetTitle()A one-line title naming the root cause; null when the provider did not return one.booleanCheck if this action has a valid explanation.booleanWhether the analysis is available field by field.voidonAttached(Run<?, ?> r) void
-
Constructor Details
-
ErrorExplanationAction
-
ErrorExplanationAction
-
-
Method Details
-
readResolve
-
getIconFileName
- Specified by:
getIconFileNamein interfaceAction
-
getDisplayName
- Specified by:
getDisplayNamein interfaceAction- Specified by:
getDisplayNamein interfaceModelObject
-
getUrlName
- Specified by:
getUrlNamein interfaceAction
-
getApi
-
getExplanation
-
getOriginalErrorLogs
-
getErrorSummary
-
getResolutionSteps
-
getBestPractices
-
getErrorSignature
-
getLabels
The headings around the explanation, in the explanation's own language. -
getTitle
A one-line title naming the root cause; null when the provider did not return one. -
getHeading
The heading for this explanation: its title when there is one, with the provider's name. -
isStructured
public boolean isStructured()Whether the analysis is available field by field. Explanations stored by older plugin versions, and free-text answers, only havegetExplanation(). -
getSummaryHtml
The summary as HTML for the panel: escaped, with backtick spans as<code>. -
getResolutionStepsHtml
-
getBestPracticesHtml
-
getSummaryPreviewHtml
The summary for the build's own page: all of it when it is short, otherwise cut at the end of a sentence, or failing that at a word. Escaped likegetSummaryHtml(). -
getProviderLabel
Provider and model for the line under the explanation, leaving out what is not known. -
getReusedFromBuild
@Exported(visibility=1) public int getReusedFromBuild()Returns the number of the earlier build whose explanation was reused for this build because it failed the same way, or0if the explanation was generated for this build. -
getReusedFromBuildUrl
The address of the explanation this one was taken over from, relative to the Jenkins root, ornullwhen it was not reused or that build no longer exists. -
getTimestamp
@Exported(visibility=1) public long getTimestamp() -
getFormattedTimestamp
-
getProviderName
-
getProviderModel
-
getUrlString
-
getInputLogLineCount
@Exported(visibility=1) public int getInputLogLineCount() -
onAttached
- Specified by:
onAttachedin interfaceRunAction2
-
onLoad
- Specified by:
onLoadin interfaceRunAction2
-
getRun
Get the associated run.- Returns:
- the run this action is attached to
-
hasValidExplanation
public boolean hasValidExplanation()Check if this action has a valid explanation.- Returns:
- true if explanation is not null, not empty, and not just whitespace
-