Interface ProgressMessageFormatter

  • All Known Implementing Classes:
    HtmlProgressMessageFormatter, PlainTextProgressMessageFormatter

    public interface ProgressMessageFormatter
    This interface has been created in order to share the same formatting code for both the Installer and the Uninstaller classes. This way we have the same look and feel for both. In addition to that not having the format of the message inside the Installer/Uninstaller classes is cleaner, as these classes should no nothing about the classes that are in charge of displaying the progress.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.forgerock.i18n.LocalizableMessage getFormattedAfterUrlClick​(String url, org.forgerock.i18n.LocalizableMessage lastText)
      Returns the log formatted representation after the user has clicked on a url.
      org.forgerock.i18n.LocalizableMessage getFormattedDone()
      Returns the formatted representation of the 'Done' text string.
      org.forgerock.i18n.LocalizableMessage getFormattedError()
      Returns the formatted representation of the 'Error' text string.
      org.forgerock.i18n.LocalizableMessage getFormattedError​(Throwable t, boolean applyMargin)
      Returns the formatted representation of an error message for a given throwable.
      org.forgerock.i18n.LocalizableMessage getFormattedError​(org.forgerock.i18n.LocalizableMessage text, boolean applyMargin)
      Returns the formatted representation of an error for a given text.
      org.forgerock.i18n.LocalizableMessage getFormattedLog​(org.forgerock.i18n.LocalizableMessage text)
      Returns the formatted representation of a log message for a given text.
      org.forgerock.i18n.LocalizableMessage getFormattedLogError​(org.forgerock.i18n.LocalizableMessage text)
      Returns the formatted 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 formatted representation of a success message for a given text.
      org.forgerock.i18n.LocalizableMessage getFormattedSummary​(org.forgerock.i18n.LocalizableMessage text)
      Returns the formatted 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 formatted representation of the text without providing any style.
      org.forgerock.i18n.LocalizableMessage getFormattedWarning​(org.forgerock.i18n.LocalizableMessage text, boolean applyMargin)
      Returns the formatted representation of a warning for a given text.
      org.forgerock.i18n.LocalizableMessage getFormattedWithPoints​(org.forgerock.i18n.LocalizableMessage text)
      Returns the formatted representation of the argument text to which we add points.
      org.forgerock.i18n.LocalizableMessage getLineBreak()
      Returns the line break formatted.
      org.forgerock.i18n.LocalizableMessage getSpace()
      Returns the formatted representation of a space.
      org.forgerock.i18n.LocalizableMessage getTab()
      Returns the tab formatted.
      org.forgerock.i18n.LocalizableMessage getTaskSeparator()
      Returns the task separator formatted.
    • Method Detail

      • getFormattedText

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

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

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

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

        org.forgerock.i18n.LocalizableMessage getFormattedSuccess​(org.forgerock.i18n.LocalizableMessage text)
        Returns the formatted representation of a success message for a given text.
        Parameters:
        text - the source text from which we want to get the formatted representation
        Returns:
        the formatted representation of a success message for the given text.
      • getFormattedLogError

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

        org.forgerock.i18n.LocalizableMessage getFormattedLog​(org.forgerock.i18n.LocalizableMessage text)
        Returns the formatted representation of a log message for a given text.
        Parameters:
        text - the source text from which we want to get the formatted representation
        Returns:
        the formatted representation of a log message for the given text.
      • getFormattedDone

        org.forgerock.i18n.LocalizableMessage getFormattedDone()
        Returns the formatted representation of the 'Done' text string.
        Returns:
        the formatted representation of the 'Done' text string.
      • getFormattedError

        org.forgerock.i18n.LocalizableMessage getFormattedError()
        Returns the formatted representation of the 'Error' text string.
        Returns:
        the formatted representation of the 'Error' text string.
      • getFormattedWithPoints

        org.forgerock.i18n.LocalizableMessage getFormattedWithPoints​(org.forgerock.i18n.LocalizableMessage text)
        Returns the formatted 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 .....'.
        Parameters:
        text - the String to which add points.
        Returns:
        the formatted representation of the '.....' text string.
      • getFormattedPoint

        org.forgerock.i18n.LocalizableMessage getFormattedPoint()
        Returns the formatted representation of a point.
        Returns:
        the formatted representation of the '.' text string.
      • getSpace

        org.forgerock.i18n.LocalizableMessage getSpace()
        Returns the formatted representation of a space.
        Returns:
        the formatted representation of the ' ' text string.
      • getFormattedProgress

        org.forgerock.i18n.LocalizableMessage getFormattedProgress​(org.forgerock.i18n.LocalizableMessage text)
        Returns the formatted representation of a progress message for a given text.
        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

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

        org.forgerock.i18n.LocalizableMessage getLineBreak()
        Returns the line break formatted.
        Returns:
        the line break formatted.
      • getTab

        org.forgerock.i18n.LocalizableMessage getTab()
        Returns the tab formatted.
        Returns:
        the tab formatted.
      • getTaskSeparator

        org.forgerock.i18n.LocalizableMessage getTaskSeparator()
        Returns the task separator formatted.
        Returns:
        the task separator formatted.
      • getFormattedAfterUrlClick

        org.forgerock.i18n.LocalizableMessage getFormattedAfterUrlClick​(String url,
                                                                        org.forgerock.i18n.LocalizableMessage lastText)
        Returns the log formatted representation after the user has clicked on a url.
        Parameters:
        url - that has been clicked
        lastText - the formatted representation of the progress log before clicking on the url.
        Returns:
        the formatted progress log representation after the user has clicked on a url.