Class Renderer

    • Constructor Detail

      • Renderer

        public Renderer()
    • Method Detail

      • setIncludeIndications

        public void setIncludeIndications​(boolean includeIndications)
        Parameters:
        includeIndications - When true, the indication numbers and links into the console log are included in the token replacement text.
      • setUseHtmlFormat

        public void setUseHtmlFormat​(boolean useHtmlFormat)
        Parameters:
        useHtmlFormat - When true, the replacement text will be an HTML snippet.
      • setIncludeTitle

        public void setIncludeTitle​(boolean includeTitle)
        Parameters:
        includeTitle - When true, the title will appear in the token replacement text.
      • setWrapWidth

        public void setWrapWidth​(int wrapWidth)
        Parameters:
        wrapWidth - Wrap long lines at this width. If wrapWidth is 0, the text isn't wrapped. Only applies if useHtmlFormat == false.
      • setNoFailureText

        public void setNoFailureText​(String noFailureText)
        Parameters:
        noFailureText - Text to return when no failure cause is present.
      • setEscapeHtml

        public void setEscapeHtml​(boolean escapeHtml)
        See DataBoundTokenMacro.escapeHtml. Only applicable when useHtmlFormat == false
        Parameters:
        escapeHtml - true if so.
      • appendHtmlOrPlain

        protected void appendHtmlOrPlain​(StringBuilder stringBuilder,
                                         String htmlText,
                                         String plainText)
        Append either the html or plain text given to the StringBuilder, depending on "useHtmlFormat" value.
        Parameters:
        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.
      • render

        public String render​(FailureCauseBuildAction action)
        Renders the Causes as provided by the action.
        Parameters:
        action - The action containing the causes
        Returns:
        The formatted causes.
      • addTitle

        protected void addTitle​(StringBuilder stringBuilder)
        Add the "Identified problems:" title to the output.
        Parameters:
        stringBuilder - the string builder to which to add the title
      • addFailureCauseDisplayDataRepresentation

        protected void addFailureCauseDisplayDataRepresentation​(StringBuilder stringBuilder,
                                                                FailureCauseDisplayData data,
                                                                int indentLevel)
        Parameters:
        stringBuilder - the string builder to which to add the failure cause data representation
        data - the failure cause display data
        indentLevel - the indent level
      • render

        public String render​(FailureCauseMatrixBuildAction matrixAction)
        Renders the Causes as provided by the action.
        Parameters:
        matrixAction - The action containing the causes
        Returns:
        The formatted causes.