Class AbstractReport

java.lang.Object
org.apache.ofbiz.htmlreport.AbstractReport
All Implemented Interfaces:
InterfaceReport
Direct Known Subclasses:
HtmlReport

public abstract class AbstractReport extends Object implements InterfaceReport
Base report class.
  • Field Details

  • Constructor Details

    • AbstractReport

      public AbstractReport()
  • Method Details

    • addError

      public void addError(Object obj)
      Description copied from interface: InterfaceReport
      Adds an error object to the list of errors that occured during the report.

      Specified by:
      addError in interface InterfaceReport
      Parameters:
      obj - the error object
    • addWarning

      public void addWarning(Object obj)
      Description copied from interface: InterfaceReport
      Adds a warning object to the list of warnings that occured during the report.

      Specified by:
      addWarning in interface InterfaceReport
      Parameters:
      obj - the error object
    • formatRuntime

      public String formatRuntime()
      Description copied from interface: InterfaceReport
      Formats the runtime formatted as "hh:mm:ss".

      Specified by:
      formatRuntime in interface InterfaceReport
      Returns:
      the runtime formatted as "hh:mm:ss"
    • getErrors

      public List<Object> getErrors()
      Description copied from interface: InterfaceReport
      Returns a list of all errors that occured during the report.

      Specified by:
      getErrors in interface InterfaceReport
      Returns:
      an error list that occured during the report
    • getLocale

      public Locale getLocale()
      Description copied from interface: InterfaceReport
      Returns the locale this report was initialized with.

      Specified by:
      getLocale in interface InterfaceReport
      Returns:
      the locale this report was initialized with
    • getRuntime

      public long getRuntime()
      Description copied from interface: InterfaceReport
      Returns the time this report has been running.

      Specified by:
      getRuntime in interface InterfaceReport
      Returns:
      the time this report has been running
    • getWarnings

      public List<Object> getWarnings()
      Description copied from interface: InterfaceReport
      Returns a list of all warnings that occured during the report.

      Specified by:
      getWarnings in interface InterfaceReport
      Returns:
      a warning list that occured during the report
    • hasError

      public boolean hasError()
      Description copied from interface: InterfaceReport
      Returns if the report generated an error output.

      Specified by:
      hasError in interface InterfaceReport
      Returns:
      true if the report generated an error, otherwise false
    • hasWarning

      public boolean hasWarning()
      Description copied from interface: InterfaceReport
      Returns if the report generated a warning output.

      Specified by:
      hasWarning in interface InterfaceReport
      Returns:
      true if the report generated a warning, otherwise false
    • resetRuntime

      public void resetRuntime()
      Description copied from interface: InterfaceReport
      Resets the runtime to 0 milliseconds.

      Specified by:
      resetRuntime in interface InterfaceReport
    • init

      protected void init(Locale locale)
      Initializes some member variables for this report.

      Parameters:
      locale - the locale for this report
    • print

      public void print(String value)
      Prints a String to the report.

      Specified by:
      print in interface InterfaceReport
      Parameters:
      value - the String to add
    • print

      public abstract void print(String value, int format)
      Prints a String to the report, using the indicated formatting.

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

      Specified by:
      print in interface InterfaceReport
      Parameters:
      value - the message container to add
      format - the formatting to use for the output
    • println

      public void println(String value)
      Prints a String with line break to the report.

      Specified by:
      println in interface InterfaceReport
      Parameters:
      value - the message container to add
    • println

      public void println(String value, int format)
      Prints a String with line break to the report, using the indicated formatting.

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

      Specified by:
      println in interface InterfaceReport
      Parameters:
      value - the String to add
      format - the formatting to use for the output