public class Renderer extends Object
FailureCauseBuildAction
or
FailureCauseMatrixBuildAction
.Modifier and Type | Class and Description |
---|---|
protected static class |
Renderer.IndicationUrlBuilder
Helps build a URL into the build log for an indication.
|
Constructor and Description |
---|
Renderer() |
Modifier and Type | Method and Description |
---|---|
protected void |
addFailureCauseDisplayDataRepresentation(StringBuilder stringBuilder,
FailureCauseDisplayData data,
int indentLevel) |
protected void |
addTitle(StringBuilder stringBuilder)
Add the "Identified problems:" title to the output.
|
protected void |
appendHtmlOrPlain(StringBuilder stringBuilder,
String htmlText,
String plainText)
Append the either the html or plain text given to the StringBuilder, depending on "useHtmlFormat" value.
|
String |
render(FailureCauseBuildAction action)
Renders the Causes as provided by the action.
|
String |
render(FailureCauseMatrixBuildAction matrixAction)
Renders the Causes as provided by the action.
|
void |
setIncludeIndications(boolean includeIndications) |
void |
setIncludeTitle(boolean includeTitle) |
void |
setNoFailureText(String noFailureText) |
void |
setUseHtmlFormat(boolean useHtmlFormat) |
void |
setWrapWidth(int wrapWidth) |
public void setIncludeIndications(boolean includeIndications)
includeIndications
- When true, the indication numbers and links into the console log are included
in the token replacement text.public void setUseHtmlFormat(boolean useHtmlFormat)
useHtmlFormat
- When true, the replacement text will be an HTML snippet.public void setIncludeTitle(boolean includeTitle)
includeTitle
- When true, the title will appear in the token replacement text.public void setWrapWidth(int wrapWidth)
wrapWidth
- Wrap long lines at this width. If wrapWidth is 0, the text isn't wrapped. Only applies if
useHtmlFormat == false.public void setNoFailureText(String noFailureText)
noFailureText
- Text to return when no failure cause is present.protected void appendHtmlOrPlain(StringBuilder stringBuilder, String htmlText, String plainText)
stringBuilder
- The StringBuilder
to append to.htmlText
- Text to append in case of html, can be null.plainText
- Text to append in case of plain text, can be null.public String render(FailureCauseBuildAction action)
action
- The action containing the causesprotected void addTitle(StringBuilder stringBuilder)
stringBuilder
- the string builder to which to add the titleprotected void addFailureCauseDisplayDataRepresentation(StringBuilder stringBuilder, FailureCauseDisplayData data, int indentLevel)
stringBuilder
- the string builder to which to add the failure cause data representationdata
- the failure cause display dataindentLevel
- the indent levelpublic String render(FailureCauseMatrixBuildAction matrixAction)
matrixAction
- The action containing the causesCopyright © 2016–2019. All rights reserved.