Package org.opencms.report
Class CmsWorkplaceReport
java.lang.Object
org.opencms.report.A_CmsReport
org.opencms.report.CmsWorkplaceReport
- All Implemented Interfaces:
I_CmsReport
Report class for displaying reports to the user in the workplace.
The difference to the older CmsHtmlReport class is that this can be used from both the old and the new Vaadin-based workplace, without having to decide when the report is created. Instead, the 'client' requesting report updates has to pass in a report update formatter instance, which is then used to format the report update for each case.
-
Field Summary
FieldsFields 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
ConstructorsConstructorDescriptionCmsWorkplaceReport(Locale locale, String siteRoot, boolean isTransient, Object logChannel) Constructs a new report using the provided locale for the output language.CmsWorkplaceReport(Locale locale, String siteRoot, Object logChannel) Constructs a new report using the provided locale for the output language. -
Method Summary
Modifier and TypeMethodDescriptionUpdates this report, this processes all new output added since the last call to this method.getReportUpdate(I_CmsReportUpdateFormatter formatter) Fetches the report update for this report since the last time this method was called.voidPrints a String to the report, using the indicated formatting.voidprintln()Adds a line break to the report.voidAdds an Exception to the report, ensuring that the Exception content is processed to generate a valid output esp.voidrewind()Rewinds the report update to the start of the report.Methods inherited from class org.opencms.report.A_CmsReport
addError, addWarning, formatRuntime, getErrors, getLastEntryTime, getLocale, getMessages, getRuntime, getSiteRoot, getWarnings, hasError, hasWarning, init, print, print, print, println, println, println, println, printMessageWithParam, printMessageWithParam, removeSiteRoot, resetRuntime, setLastEntryTime
-
Field Details
-
FORMAT_NEWLINE
Format constant for newlines.- See Also:
-
-
Constructor Details
-
CmsWorkplaceReport
Constructs a new report using the provided locale for the output language.- Parameters:
locale- the locale to use for the output languagesiteRoot- the site root of the user who started this report (may benull)isTransient- If set totruenothing is kept in memorylogChannel- the log channel to send the report output to (or null if this shouldn't be done)
-
CmsWorkplaceReport
Constructs a new report using the provided locale for the output language.- Parameters:
locale- the locale to use for the output languagesiteRoot- the site root of the user who started this report (may benull)logChannel- the log channel to send the report output to (or null if this shouldn't be done)
-
-
Method Details
-
getReportUpdate
Description copied from interface:I_CmsReportUpdates 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:
-
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- Overrides:
getReportUpdatein classA_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:
-
print
Description copied from class:A_CmsReportPrints a String to the report, using the indicated formatting.Use the constants starting with
FORMATfrom this interface to indicate which formatting to use.- Specified by:
printin classA_CmsReport- Parameters:
value- the message container to addformat- the formatting to use for the output- See Also:
-
println
Description copied from interface:I_CmsReportAdds a line break to the report.- See Also:
-
println
Description copied from interface:I_CmsReportAdds 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:
-
rewind
Rewinds the report update to the start of the report.
-