Class HtmlProgressMessageFormatter

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.forgerock.i18n.LocalizableMessage getFormattedAfterUrlClick​(String url, org.forgerock.i18n.LocalizableMessage lastText)
      Returns the log HTML representation after the user has clicked on a url.
      org.forgerock.i18n.LocalizableMessage getFormattedDone()
      Returns the HTML representation of the 'Done' text string.
      org.forgerock.i18n.LocalizableMessage getFormattedError()
      Returns the HTML representation of the 'Error' text string.
      org.forgerock.i18n.LocalizableMessage getFormattedError​(Throwable t, boolean applyMargin)
      Returns the HTML representation of an error message for a given throwable.
      org.forgerock.i18n.LocalizableMessage getFormattedError​(org.forgerock.i18n.LocalizableMessage text, boolean applyMargin)
      Returns the HTML representation of an error for a given text.
      org.forgerock.i18n.LocalizableMessage getFormattedLog​(org.forgerock.i18n.LocalizableMessage text)
      Returns the HTML representation of a log message for a given text.
      org.forgerock.i18n.LocalizableMessage getFormattedLogError​(org.forgerock.i18n.LocalizableMessage text)
      Returns the HTML representation of a log error message for a given text.
      org.forgerock.i18n.LocalizableMessage getFormattedPoint()
      Returns the formatted representation of a point.
      org.forgerock.i18n.LocalizableMessage getFormattedProgress​(org.forgerock.i18n.LocalizableMessage text)
      Returns the formatted representation of a progress message for a given text.
      org.forgerock.i18n.LocalizableMessage getFormattedSuccess​(org.forgerock.i18n.LocalizableMessage text)
      Returns the HTML representation of a success message for a given text.
      org.forgerock.i18n.LocalizableMessage getFormattedSummary​(org.forgerock.i18n.LocalizableMessage text)
      Returns the HTML representation of the text that is the summary of the installation process (the one that goes in the UI next to the progress bar).
      org.forgerock.i18n.LocalizableMessage getFormattedText​(org.forgerock.i18n.LocalizableMessage text)
      Returns the HTML representation of the text without providing any style.
      org.forgerock.i18n.LocalizableMessage getFormattedWarning​(org.forgerock.i18n.LocalizableMessage text, boolean applyMargin)
      Returns the HTML representation of a warning for a given text.
      org.forgerock.i18n.LocalizableMessage getFormattedWithPoints​(org.forgerock.i18n.LocalizableMessage text)
      Returns the HTML representation of the argument text to which we add points.
      org.forgerock.i18n.LocalizableMessage getLineBreak()
      Returns the line break in HTML.
      org.forgerock.i18n.LocalizableMessage getSpace()
      Returns the formatted representation of a space.
      org.forgerock.i18n.LocalizableMessage getTab()
      Returns the tab in HTML.
      org.forgerock.i18n.LocalizableMessage getTaskSeparator()
      Returns the task separator in HTML.
    • Constructor Detail

      • HtmlProgressMessageFormatter

        public HtmlProgressMessageFormatter()
    • Method Detail

      • getFormattedText

        public org.forgerock.i18n.LocalizableMessage getFormattedText​(org.forgerock.i18n.LocalizableMessage text)
        Returns the HTML representation of the text without providing any style.
        Specified by:
        getFormattedText in interface ProgressMessageFormatter
        Parameters:
        text - the source text from which we want to get the HTML representation
        Returns:
        the HTML representation for the given text.
      • getFormattedSummary

        public org.forgerock.i18n.LocalizableMessage getFormattedSummary​(org.forgerock.i18n.LocalizableMessage text)
        Returns the HTML representation of the text that is the summary of the installation process (the one that goes in the UI next to the progress bar).
        Specified by:
        getFormattedSummary in interface ProgressMessageFormatter
        Parameters:
        text - the source text from which we want to get the formatted representation
        Returns:
        the HTML representation of the summary for the given text.
      • getFormattedError

        public org.forgerock.i18n.LocalizableMessage getFormattedError​(org.forgerock.i18n.LocalizableMessage text,
                                                                       boolean applyMargin)
        Returns the HTML representation of an error for a given text.
        Specified by:
        getFormattedError in interface ProgressMessageFormatter
        Parameters:
        text - the source text from which we want to get the HTML representation
        applyMargin - specifies whether we apply a margin or not to the resulting HTML.
        Returns:
        the HTML representation of an error for the given text.
      • getFormattedWarning

        public org.forgerock.i18n.LocalizableMessage getFormattedWarning​(org.forgerock.i18n.LocalizableMessage text,
                                                                         boolean applyMargin)
        Returns the HTML representation of a warning for a given text.
        Specified by:
        getFormattedWarning in interface ProgressMessageFormatter
        Parameters:
        text - the source text from which we want to get the HTML representation
        applyMargin - specifies whether we apply a margin or not to the resulting HTML.
        Returns:
        the HTML representation of a warning for the given text.
      • getFormattedSuccess

        public org.forgerock.i18n.LocalizableMessage getFormattedSuccess​(org.forgerock.i18n.LocalizableMessage text)
        Returns the HTML representation of a success message for a given text.
        Specified by:
        getFormattedSuccess in interface ProgressMessageFormatter
        Parameters:
        text - the source text from which we want to get the HTML representation
        Returns:
        the HTML representation of a success message for the given text.
      • getFormattedLogError

        public org.forgerock.i18n.LocalizableMessage getFormattedLogError​(org.forgerock.i18n.LocalizableMessage text)
        Returns the HTML representation of a log error message for a given text.
        Specified by:
        getFormattedLogError in interface ProgressMessageFormatter
        Parameters:
        text - the source text from which we want to get the HTML representation
        Returns:
        the HTML representation of a log error message for the given text.
      • getFormattedLog

        public org.forgerock.i18n.LocalizableMessage getFormattedLog​(org.forgerock.i18n.LocalizableMessage text)
        Returns the HTML representation of a log message for a given text.
        Specified by:
        getFormattedLog in interface ProgressMessageFormatter
        Parameters:
        text - the source text from which we want to get the HTML representation
        Returns:
        the HTML representation of a log message for the given text.
      • getFormattedDone

        public org.forgerock.i18n.LocalizableMessage getFormattedDone()
        Returns the HTML representation of the 'Done' text string.
        Specified by:
        getFormattedDone in interface ProgressMessageFormatter
        Returns:
        the HTML representation of the 'Done' text string.
      • getFormattedError

        public org.forgerock.i18n.LocalizableMessage getFormattedError()
        Returns the HTML representation of the 'Error' text string.
        Specified by:
        getFormattedError in interface ProgressMessageFormatter
        Returns:
        the HTML representation of the 'Error' text string.
      • getFormattedWithPoints

        public org.forgerock.i18n.LocalizableMessage getFormattedWithPoints​(org.forgerock.i18n.LocalizableMessage text)
        Returns the HTML representation of the argument text to which we add points. For instance if we pass as argument 'Configuring Server' the return value will be 'Configuring Server .....'.
        Specified by:
        getFormattedWithPoints in interface ProgressMessageFormatter
        Parameters:
        text - the String to which add points.
        Returns:
        the HTML representation of the '.....' text string.
      • getFormattedPoint

        public org.forgerock.i18n.LocalizableMessage getFormattedPoint()
        Returns the formatted representation of a point.
        Specified by:
        getFormattedPoint in interface ProgressMessageFormatter
        Returns:
        the formatted representation of the '.' text string.
      • getSpace

        public org.forgerock.i18n.LocalizableMessage getSpace()
        Returns the formatted representation of a space.
        Specified by:
        getSpace in interface ProgressMessageFormatter
        Returns:
        the formatted representation of the ' ' text string.
      • getFormattedProgress

        public org.forgerock.i18n.LocalizableMessage getFormattedProgress​(org.forgerock.i18n.LocalizableMessage text)
        Returns the formatted representation of a progress message for a given text.
        Specified by:
        getFormattedProgress in interface ProgressMessageFormatter
        Parameters:
        text - the source text from which we want to get the formatted representation
        Returns:
        the formatted representation of a progress message for the given text.
      • getFormattedError

        public org.forgerock.i18n.LocalizableMessage getFormattedError​(Throwable t,
                                                                       boolean applyMargin)
        Returns the HTML representation of an error message for a given throwable. This method applies a margin if the applyMargin parameter is true.
        Specified by:
        getFormattedError in interface ProgressMessageFormatter
        Parameters:
        t - the throwable.
        applyMargin - specifies whether we apply a margin or not to the resulting HTML.
        Returns:
        the HTML representation of an error message for the given exception.
      • getLineBreak

        public org.forgerock.i18n.LocalizableMessage getLineBreak()
        Returns the line break in HTML.
        Specified by:
        getLineBreak in interface ProgressMessageFormatter
        Returns:
        the line break in HTML.
      • getTab

        public org.forgerock.i18n.LocalizableMessage getTab()
        Returns the tab in HTML.
        Specified by:
        getTab in interface ProgressMessageFormatter
        Returns:
        the tab in HTML.
      • getTaskSeparator

        public org.forgerock.i18n.LocalizableMessage getTaskSeparator()
        Returns the task separator in HTML.
        Specified by:
        getTaskSeparator in interface ProgressMessageFormatter
        Returns:
        the task separator in HTML.
      • getFormattedAfterUrlClick

        public org.forgerock.i18n.LocalizableMessage getFormattedAfterUrlClick​(String url,
                                                                               org.forgerock.i18n.LocalizableMessage lastText)
        Returns the log HTML representation after the user has clicked on a url.
        Specified by:
        getFormattedAfterUrlClick in interface ProgressMessageFormatter
        Parameters:
        url - that has been clicked
        lastText - the HTML representation of the log before clicking on the url.
        Returns:
        the log HTML representation after the user has clicked on a url.
        See Also:
        getErrorWithStackHtml(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean)