Interface InterfaceReport

All Known Implementing Classes:
AbstractHtmlReport, AbstractReport, HtmlReport, PricatParseExcelHtmlReport, SampleHtmlReport

public interface InterfaceReport
This is the interface for the report classes which are used for the output during operations that run on a separate Thread in OFBiz, like import, export etc.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Indicates default formatting.
    static final int
    Indicates error formatting.
    static final int
    Indicates headline formatting.
    static final int
    Indicates note formatting.
    static final int
    Indicates OK formatting.
    static final int
    Indicates warning formatting.
    static final String
    Request parameter value that this report should create an "extended" output.
    static final String
    Request parameter value that this report should create a "simple" output.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds an error object to the list of errors that occured during the report.
    void
    addLogFile(String logFileName)
    Add a log file to the report.
    void
    Adds a warning object to the list of warnings that occured during the report.
    Close log file if necessary.
    Formats the runtime formatted as "hh:mm:ss".
    Returns a list of all errors that occured during the report.
    Returns the locale this report was initialized with.
    Updates this report, this processes all new output added since the last call to this method.
    long
    Returns the time this report has been running.
    long
     
    Returns a list of all warnings that occured during the report.
    boolean
    Returns if the report generated an error output.
    boolean
    Returns if the report generated a warning output.
    void
    print(String uiLabel)
    Prints a localized message to the report.
    void
    print(String uiLabel, int format)
    Prints a localized message to the report, using the indicated formatting.
    void
    Adds a line break to the report.
    void
    println(String uiLabel)
    Prints a localized message to the report.
    void
    println(String uiLabel, int format)
    Prints a localized message to the report, using the indicated formatting.
    void
    Adds an Exception to the report, ensuring that the Exception content is processed to generate a valid output esp.
    void
    printMessageWithParam(int m, int n, String uiLabel, Object param)
    Convenience method to print a localized message, followed by a parameter and dots to the report.
    void
    Prints a localized message followed by a parameter and dots to the report.
    void
    Resets the runtime to 0 milliseconds.
    void
    setSequenceNum(long sequenceNum)
    Set log's sequence number.
  • Field Details

    • FORMAT_DEFAULT

      static final int FORMAT_DEFAULT
      Indicates default formatting.
      See Also:
    • FORMAT_ERROR

      static final int FORMAT_ERROR
      Indicates error formatting.
      See Also:
    • FORMAT_HEADLINE

      static final int FORMAT_HEADLINE
      Indicates headline formatting.
      See Also:
    • FORMAT_NOTE

      static final int FORMAT_NOTE
      Indicates note formatting.
      See Also:
    • FORMAT_OK

      static final int FORMAT_OK
      Indicates OK formatting.
      See Also:
    • FORMAT_WARNING

      static final int FORMAT_WARNING
      Indicates warning formatting.
      See Also:
    • REPORT_TYPE_EXTENDED

      static final String REPORT_TYPE_EXTENDED
      Request parameter value that this report should create an "extended" output.
      See Also:
    • REPORT_TYPE_SIMPLE

      static final String REPORT_TYPE_SIMPLE
      Request parameter value that this report should create a "simple" output.
      See Also:
  • Method Details

    • addError

      void addError(Object obj)
      Adds an error object to the list of errors that occured during the report.

      Parameters:
      obj - the error object
    • addWarning

      void addWarning(Object obj)
      Adds a warning object to the list of warnings that occured during the report.

      Parameters:
      obj - the error object
    • formatRuntime

      String formatRuntime()
      Formats the runtime formatted as "hh:mm:ss".

      Returns:
      the runtime formatted as "hh:mm:ss"
    • getErrors

      List<Object> getErrors()
      Returns a list of all errors that occured during the report.

      Returns:
      an error list that occured during the report
    • getLocale

      Locale getLocale()
      Returns the locale this report was initialized with.

      Returns:
      the locale this report was initialized with
    • getReportUpdate

      String getReportUpdate()
      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.
    • getRuntime

      long getRuntime()
      Returns the time this report has been running.

      Returns:
      the time this report has been running
    • getWarnings

      List<Object> getWarnings()
      Returns a list of all warnings that occured during the report.

      Returns:
      a warning list that occured during the report
    • hasError

      boolean hasError()
      Returns if the report generated an error output.

      Returns:
      true if the report generated an error, otherwise false
    • hasWarning

      boolean hasWarning()
      Returns if the report generated a warning output.

      Returns:
      true if the report generated a warning, otherwise false
    • print

      void print(String uiLabel)
      Prints a localized message to the report.

      Parameters:
      uiLabel - the String to add
    • print

      void print(String uiLabel, int format)
      Prints a localized message to the report, using the indicated formatting.

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

      Parameters:
      uiLabel - the String to add
      format - the formatting to use for the output
    • println

      void println()
      Adds a line break to the report.

    • println

      void println(String uiLabel)
      Prints a localized message to the report.

      Parameters:
      uiLabel - the message to add
    • println

      void println(String uiLabel, int format)
      Prints a localized message to the report, using the indicated formatting.

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

      Parameters:
      uiLabel - the message container to add
      format - the formatting to use for the output
    • println

      void println(Throwable t)
      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
    • printMessageWithParam

      void printMessageWithParam(String uiLabel, Object param)
      Prints a localized message followed by a parameter and dots to the report.

      Parameters:
      uiLabel - the Message to add
      param - the Parameter to add
    • printMessageWithParam

      void printMessageWithParam(int m, int n, String uiLabel, Object param)
      Convenience method to print a localized message, followed by a parameter and dots to the report.

      The output follows the pattern: ( 3 / 8 ) Deleting filename.txt ...

      Parameters:
      m - the number of the report output
      n - the total number of report outputs
      uiLabel - the Message to add
      param - the Parameter to add
    • resetRuntime

      void resetRuntime()
      Resets the runtime to 0 milliseconds.

    • addLogFile

      void addLogFile(String logFileName)
      Add a log file to the report.
      Parameters:
      logFileName -
    • closeLogFile

      String closeLogFile()
      Close log file if necessary.
    • setSequenceNum

      void setSequenceNum(long sequenceNum)
      Set log's sequence number.
      Parameters:
      sequenceNum -
    • getSequenceNum

      long getSequenceNum()