Class CmsStringBufferReport

java.lang.Object
org.opencms.report.A_CmsReport
org.opencms.report.CmsStringBufferReport
All Implemented Interfaces:
I_CmsReport

public class CmsStringBufferReport extends A_CmsReport
Report class used to write the output of a report to a StringBuffer.

It stores everything and generates no output. After the report is finished, you can access to result of the report using the toString() method.

Since:
6.0.0
  • Constructor Details

    • CmsStringBufferReport

      public CmsStringBufferReport(Locale locale)
      Constructs a new report using the provided locale for the output language.

      Parameters:
      locale - the locale to use for the output language
  • Method Details

    • 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:
    • print

      public void print(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:
    • println

      public void println()
      Description copied from interface: I_CmsReport
      Adds a line break to the report.

      See Also:
    • println

      public void println(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:
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also: