Package org.opencms.report
Class A_CmsReport
java.lang.Object
org.opencms.report.A_CmsReport
- All Implemented Interfaces:
I_CmsReport
- Direct Known Subclasses:
CmsHtmlReport,CmsLogReport,CmsMultiplexReport,CmsStringBufferReport,CmsWorkplaceReport
Base report class.
- Since:
- 6.0.0
-
Field Summary
Fields inherited from interface org.opencms.report.I_CmsReport
FORMAT_DEFAULT, FORMAT_ERROR, FORMAT_HEADLINE, FORMAT_NOTE, FORMAT_OK, FORMAT_WARNING, REPORT_TYPE_EXTENDED, REPORT_TYPE_SIMPLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds an error object to the list of errors that occurred during the report.voidaddWarning(Object obj) Adds a warning object to the list of warnings that occurred during the report.Formats the runtime formatted as "hh:mm:ss".Returns a list of all errors that occurred during the report.longReturns the time of last report entry.Returns the locale this report was initialized with.protected CmsMessagesReturns the default report message bundle.getReportUpdate(I_CmsReportUpdateFormatter formatter) Fetches the report update for this report since the last time this method was called.longReturns the time this report has been running.Returns the original site root of the user who started this report, ornullif the original site root has not been set.Returns a list of all warnings that occurred during the report.booleanhasError()Returns if the report generated an error output.booleanReturns if the report generated a warning output.protected voidInitializes some member variables for this report.protected voidPrints a String to the report.protected abstract voidPrints a String to the report, using the indicated formatting.voidprint(CmsMessageContainer container) Prints a localized message to the report.voidprint(CmsMessageContainer container, int format) Prints a localized message to the report, using the indicated formatting.protected voidPrints a String with line break to the report.protected voidPrints a String with line break to the report, using the indicated formatting.voidprintln(CmsMessageContainer container) Prints a localized message to the report.voidprintln(CmsMessageContainer container, int format) Prints a localized message to the report, using the indicated formatting.voidprintMessageWithParam(int m, int n, CmsMessageContainer container, Object param) Convenience method to print a localized message, followed by a parameter and dots to the report.voidprintMessageWithParam(CmsMessageContainer container, Object param) Prints a localized message followed by a parametera and dots to the report.removeSiteRoot(String resourcename) Removes the report site root prefix from the absolute path in the resource name, that is adjusts the resource name for the report site root.voidResets the runtime to 0 milliseconds.protected voidsetLastEntryTime(long time) Sets the time of the last report entry.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opencms.report.I_CmsReport
getReportUpdate, println, println
-
Constructor Details
-
A_CmsReport
public A_CmsReport()
-
-
Method Details
-
addError
Description copied from interface:I_CmsReportAdds an error object to the list of errors that occurred during the report.- Specified by:
addErrorin interfaceI_CmsReport- Parameters:
obj- the error object- See Also:
-
addWarning
Description copied from interface:I_CmsReportAdds a warning object to the list of warnings that occurred during the report.- Specified by:
addWarningin interfaceI_CmsReport- Parameters:
obj- the error object- See Also:
-
formatRuntime
Description copied from interface:I_CmsReportFormats the runtime formatted as "hh:mm:ss".- Specified by:
formatRuntimein interfaceI_CmsReport- Returns:
- the runtime formatted as "hh:mm:ss"
- See Also:
-
getErrors
Description copied from interface:I_CmsReportReturns a list of all errors that occurred during the report.- Specified by:
getErrorsin interfaceI_CmsReport- Returns:
- an error list that occurred during the report
- See Also:
-
getLastEntryTime
Description copied from interface:I_CmsReportReturns the time of last report entry.Will return zero if no entry has been written.
- Specified by:
getLastEntryTimein interfaceI_CmsReport- Returns:
- time of last report entry
- See Also:
-
getLocale
Description copied from interface:I_CmsReportReturns the locale this report was initialized with.- Specified by:
getLocalein interfaceI_CmsReport- Returns:
- the locale this report was initialized with
- See Also:
-
getReportUpdate
Description copied from interface:I_CmsReportFetches the report update for this report since the last time this method was called.- Specified by:
getReportUpdatein interfaceI_CmsReport- Parameters:
formatter- the formatter to use for formatting the report output- Returns:
- the output for report elements that have been added to the report and not yet processed
- See Also:
-
getRuntime
Description copied from interface:I_CmsReportReturns the time this report has been running.- Specified by:
getRuntimein interfaceI_CmsReport- Returns:
- the time this report has been running
- See Also:
-
getSiteRoot
Returns the original site root of the user who started this report, ornullif the original site root has not been set.- Specified by:
getSiteRootin interfaceI_CmsReport- Returns:
- the original site root of the user who started this report
-
getWarnings
Description copied from interface:I_CmsReportReturns a list of all warnings that occurred during the report.- Specified by:
getWarningsin interfaceI_CmsReport- Returns:
- a warning list that occurred during the report
- See Also:
-
hasError
Description copied from interface:I_CmsReportReturns if the report generated an error output.- Specified by:
hasErrorin interfaceI_CmsReport- Returns:
- true if the report generated an error, otherwise false
- See Also:
-
hasWarning
Description copied from interface:I_CmsReportReturns if the report generated a warning output.- Specified by:
hasWarningin interfaceI_CmsReport- Returns:
- true if the report generated a warning, otherwise false
- See Also:
-
print
Description copied from interface:I_CmsReportPrints a localized message to the report.- Specified by:
printin interfaceI_CmsReport- Parameters:
container- the String to add- See Also:
-
print
Description copied from interface:I_CmsReportPrints a localized message to the report, using the indicated formatting.Use the contants starting with
FORMATfrom this interface to indicate which formatting to use.- Specified by:
printin interfaceI_CmsReport- Parameters:
container- the String to addformat- the formatting to use for the output- See Also:
-
println
Description copied from interface:I_CmsReportPrints a localized message to the report.- Specified by:
printlnin interfaceI_CmsReport- Parameters:
container- the message container to add- See Also:
-
println
Description copied from interface:I_CmsReportPrints a localized message to the report, using the indicated formatting.Use the contants starting with
FORMATfrom this interface to indicate which formatting to use.- Specified by:
printlnin interfaceI_CmsReport- Parameters:
container- the message container to addformat- the formatting to use for the output- See Also:
-
printMessageWithParam
Description copied from interface:I_CmsReportPrints a localized message followed by a parametera and dots to the report.- Specified by:
printMessageWithParamin interfaceI_CmsReport- Parameters:
container- the Message to addparam- the Parameter to add- See Also:
-
printMessageWithParam
Description copied from interface:I_CmsReportConvenience 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 ...
- Specified by:
printMessageWithParamin interfaceI_CmsReport- Parameters:
m- the number of the report outputn- the total number of report outputscontainer- the Message to addparam- the Parameter to add- See Also:
-
removeSiteRoot
Removes the report site root prefix from the absolute path in the resource name, that is adjusts the resource name for the report site root.If the site root for this report has not been set, or the resource name does not start with the report site root, the name it is left untouched.
- Specified by:
removeSiteRootin interfaceI_CmsReport- Parameters:
resourcename- the resource name (full path)- Returns:
- the resource name adjusted for the report site root
- See Also:
-
resetRuntime
Description copied from interface:I_CmsReportResets the runtime to 0 milliseconds.- Specified by:
resetRuntimein interfaceI_CmsReport- See Also:
-
getMessages
Returns the default report message bundle.- Returns:
- the default report message bundle
-
init
Initializes some member variables for this report.- Parameters:
locale- the locale for this reportsiteRoot- the site root of the user who started this report (may benull)
-
print
Prints a String to the report.- Parameters:
value- the String to add
-
print
Prints a String to the report, using the indicated formatting.Use the constants starting with
FORMATfrom this interface to indicate which formatting to use.- Parameters:
value- the message container to addformat- the formatting to use for the output
-
println
Prints a String with line break to the report.- Parameters:
value- the message container to add
-
println
Prints a String with line break to the report, using the indicated formatting.Use the constants starting with
C_FORMATfrom this interface to indicate which formatting to use.- Parameters:
value- the String to addformat- the formatting to use for the output
-
setLastEntryTime
Sets the time of the last report entry.- Parameters:
time- the time of the actual entry
-