Class CmsWorkplaceReport

  • All Implemented Interfaces:
    I_CmsReport

    public class CmsWorkplaceReport
    extends A_CmsReport
    Report class for displaying reports to the user in the workplace.

    The difference to the older CmsHtmlReport class is that this can be used from both the old and the new Vaadin-based workplace, without having to decide when the report is created. Instead, the 'client' requesting report updates has to pass in a report update formatter instance, which is then used to format the report update for each case.

    • Constructor Detail

      • CmsWorkplaceReport

        public CmsWorkplaceReport​(java.util.Locale locale,
                                  java.lang.String siteRoot,
                                  boolean isTransient,
                                  java.lang.Object logChannel)
        Constructs a new report using the provided locale for the output language.

        Parameters:
        locale - the locale to use for the output language
        siteRoot - the site root of the user who started this report (may be null)
        isTransient - If set to true nothing is kept in memory
        logChannel - the log channel to send the report output to (or null if this shouldn't be done)
      • CmsWorkplaceReport

        public CmsWorkplaceReport​(java.util.Locale locale,
                                  java.lang.String siteRoot,
                                  java.lang.Object logChannel)
        Constructs a new report using the provided locale for the output language.

        Parameters:
        locale - the locale to use for the output language
        siteRoot - the site root of the user who started this report (may be null)
        logChannel - the log channel to send the report output to (or null if this shouldn't be done)
    • Method Detail

      • getReportUpdate

        public java.lang.String getReportUpdate()
        Description copied from interface: I_CmsReport
        Updates this report, this processes all new output added since the last call to this method.

        This is only required in case the output is written to a HTML page, if the shell output is used, this will just return an empty String.

        Returns:
        new elements that have been added to the report and not yet processed.
        See Also:
        I_CmsReport.getReportUpdate()
      • print

        public void print​(java.lang.String value,
                          int format)
        Description copied from class: A_CmsReport
        Prints a String to the report, using the indicated formatting.

        Use the constants starting with FORMAT from this interface to indicate which formatting to use.

        Specified by:
        print in class A_CmsReport
        Parameters:
        value - the message container to add
        format - the formatting to use for the output
        See Also:
        A_CmsReport.print(java.lang.String, int)
      • println

        public void println​(java.lang.Throwable t)
        Description copied from interface: I_CmsReport
        Adds an Exception to the report, ensuring that the Exception content is processed to generate a valid output esp. for HTML pages.

        The exception will be stored and the output will later be processed in a special way.

        Parameters:
        t - the exception to add
        See Also:
        I_CmsReport.println(java.lang.Throwable)
      • rewind

        public void rewind()
        Rewinds the report update to the start of the report.