Package org.apache.ofbiz.htmlreport
Class AbstractReport
java.lang.Object
org.apache.ofbiz.htmlreport.AbstractReport
- All Implemented Interfaces:
InterfaceReport
- Direct Known Subclasses:
HtmlReport
Base report class.
-
Field Summary
Fields inherited from interface org.apache.ofbiz.htmlreport.InterfaceReport
FORMAT_DEFAULT, FORMAT_ERROR, FORMAT_HEADLINE, FORMAT_NOTE, FORMAT_OK, FORMAT_WARNING, REPORT_TYPE_EXTENDED, REPORT_TYPE_SIMPLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds an error object to the list of errors that occured during the report.void
addWarning
(Object obj) Adds a warning object to the list of warnings that occured during the report.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.long
Returns the time this report has been running.Returns a list of all warnings that occured during the report.boolean
hasError()
Returns if the report generated an error output.boolean
Returns if the report generated a warning output.protected void
Initializes some member variables for this report.void
Prints a String to the report.abstract void
Prints a String to the report, using the indicated formatting.void
Prints a String with line break to the report.void
Prints a String with line break to the report, using the indicated formatting.void
Resets the runtime to 0 milliseconds.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.ofbiz.htmlreport.InterfaceReport
addLogFile, closeLogFile, getReportUpdate, getSequenceNum, println, println, printMessageWithParam, printMessageWithParam, setSequenceNum
-
Field Details
-
SESSION_REPORT_CLASS
- See Also:
-
-
Constructor Details
-
AbstractReport
public AbstractReport()
-
-
Method Details
-
addError
Description copied from interface:InterfaceReport
Adds an error object to the list of errors that occured during the report.- Specified by:
addError
in interfaceInterfaceReport
- Parameters:
obj
- the error object
-
addWarning
Description copied from interface:InterfaceReport
Adds a warning object to the list of warnings that occured during the report.- Specified by:
addWarning
in interfaceInterfaceReport
- Parameters:
obj
- the error object
-
formatRuntime
Description copied from interface:InterfaceReport
Formats the runtime formatted as "hh:mm:ss".- Specified by:
formatRuntime
in interfaceInterfaceReport
- Returns:
- the runtime formatted as "hh:mm:ss"
-
getErrors
Description copied from interface:InterfaceReport
Returns a list of all errors that occured during the report.- Specified by:
getErrors
in interfaceInterfaceReport
- Returns:
- an error list that occured during the report
-
getLocale
Description copied from interface:InterfaceReport
Returns the locale this report was initialized with.- Specified by:
getLocale
in interfaceInterfaceReport
- 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 interfaceInterfaceReport
- Returns:
- the time this report has been running
-
getWarnings
Description copied from interface:InterfaceReport
Returns a list of all warnings that occured during the report.- Specified by:
getWarnings
in interfaceInterfaceReport
- 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 interfaceInterfaceReport
- 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 interfaceInterfaceReport
- 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 interfaceInterfaceReport
-
init
Initializes some member variables for this report.- Parameters:
locale
- the locale for this report
-
print
Prints a String to the report.- Specified by:
print
in interfaceInterfaceReport
- Parameters:
value
- the String to add
-
print
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 interfaceInterfaceReport
- Parameters:
value
- the message container to addformat
- the formatting to use for the output
-
println
Prints a String with line break to the report.- Specified by:
println
in interfaceInterfaceReport
- Parameters:
value
- the message container to add
-
println
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 interfaceInterfaceReport
- Parameters:
value
- the String to addformat
- the formatting to use for the output
-