Class PlainTextProgressMessageFormatter

    • 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 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.
    • Constructor Detail

      • PlainTextProgressMessageFormatter

        public PlainTextProgressMessageFormatter()
    • Method Detail

      • getFormattedText

        public org.forgerock.i18n.LocalizableMessage getFormattedText​(org.forgerock.i18n.LocalizableMessage text)
        Description copied from interface: ProgressMessageFormatter
        Returns the formatted 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 formatted representation
        Returns:
        the formatted representation for the given text.
      • getFormattedSummary

        public org.forgerock.i18n.LocalizableMessage getFormattedSummary​(org.forgerock.i18n.LocalizableMessage text)
        Description copied from interface: ProgressMessageFormatter
        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).
        Specified by:
        getFormattedSummary in interface ProgressMessageFormatter
        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

        public org.forgerock.i18n.LocalizableMessage getFormattedError​(org.forgerock.i18n.LocalizableMessage text,
                                                                       boolean applyMargin)
        Description copied from interface: ProgressMessageFormatter
        Returns the formatted 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 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

        public org.forgerock.i18n.LocalizableMessage getFormattedWarning​(org.forgerock.i18n.LocalizableMessage text,
                                                                         boolean applyMargin)
        Description copied from interface: ProgressMessageFormatter
        Returns the formatted 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 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

        public org.forgerock.i18n.LocalizableMessage getFormattedSuccess​(org.forgerock.i18n.LocalizableMessage text)
        Description copied from interface: ProgressMessageFormatter
        Returns the formatted 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 formatted representation
        Returns:
        the formatted representation of a success message for the given text.
      • getFormattedLogError

        public org.forgerock.i18n.LocalizableMessage getFormattedLogError​(org.forgerock.i18n.LocalizableMessage text)
        Description copied from interface: ProgressMessageFormatter
        Returns the formatted 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 formatted representation
        Returns:
        the formatted representation of a log error message for the given text.
      • getFormattedLog

        public org.forgerock.i18n.LocalizableMessage getFormattedLog​(org.forgerock.i18n.LocalizableMessage text)
        Description copied from interface: ProgressMessageFormatter
        Returns the formatted 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 formatted representation
        Returns:
        the formatted representation of a log message for the given text.
      • getFormattedDone

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

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

        public org.forgerock.i18n.LocalizableMessage getFormattedWithPoints​(org.forgerock.i18n.LocalizableMessage text)
        Description copied from interface: ProgressMessageFormatter
        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 .....'.
        Specified by:
        getFormattedWithPoints in interface ProgressMessageFormatter
        Parameters:
        text - the String to which add points.
        Returns:
        the formatted representation of the '.....' text string.
      • getFormattedPoint

        public org.forgerock.i18n.LocalizableMessage getFormattedPoint()
        Description copied from interface: ProgressMessageFormatter
        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()
        Description copied from interface: ProgressMessageFormatter
        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)
        Description copied from interface: ProgressMessageFormatter
        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)
        Description copied from interface: ProgressMessageFormatter
        Returns the formatted 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 formatted text.
        Returns:
        the formatted representation of an error message for the given exception.
      • getFormattedAfterUrlClick

        public org.forgerock.i18n.LocalizableMessage getFormattedAfterUrlClick​(String url,
                                                                               org.forgerock.i18n.LocalizableMessage lastText)
        Description copied from interface: ProgressMessageFormatter
        Returns the log formatted representation after the user has clicked on a url.
        Specified by:
        getFormattedAfterUrlClick in interface ProgressMessageFormatter
        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.