Package org.opencms.report
Class CmsHtmlReport
java.lang.Object
org.opencms.report.A_CmsReport
org.opencms.report.CmsHtmlReport
- All Implemented Interfaces:
I_CmsReport
- Direct Known Subclasses:
CmsPrintStreamReport
HTML report output to be used for import / export / publish operations
in the entire OpenCms system.
- Since:
- 6.0.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Constant for a HTML linebreak with added "real" line break.static final String
Constant for a HTML linebreak with added "real" line break- traditional style for report threads that still use XML templates for their output.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
ConstructorDescriptionCmsHtmlReport
(Locale locale, String siteRoot) Constructs a new report using the provided locale for the output language.CmsHtmlReport
(Locale locale, String siteRoot, boolean writeHtml, boolean isTransient) Constructs a new report using the provided locale for the output language. -
Method Summary
Modifier and TypeMethodDescriptionprotected String
Returns the correct line break notation depending on the output style of this report.Updates this report, this processes all new output added since the last call to this method.boolean
Returns if the report writes html or javascript code.void
Prints a String to the report, using the indicated formatting.void
println()
Adds a line break to the report.void
Adds an Exception to the report, ensuring that the Exception content is processed to generate a valid output esp.Methods inherited from class org.opencms.report.A_CmsReport
addError, addWarning, formatRuntime, getErrors, getLastEntryTime, getLocale, getMessages, getReportUpdate, getRuntime, getSiteRoot, getWarnings, hasError, hasWarning, init, print, print, print, println, println, println, println, printMessageWithParam, printMessageWithParam, removeSiteRoot, resetRuntime, setLastEntryTime
-
Field Details
-
LINEBREAK
Constant for a HTML linebreak with added "real" line break.- See Also:
-
LINEBREAK_TRADITIONAL
Constant for a HTML linebreak with added "real" line break- traditional style for report threads that still use XML templates for their output.- See Also:
-
-
Constructor Details
-
CmsHtmlReport
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
)
-
CmsHtmlReport
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
)writeHtml
- iftrue
, this report should generate HTML instead of JavaScript outputisTransient
- If set totrue
nothing is kept in memory
-
-
Method Details
-
getReportUpdate
Description copied from interface:I_CmsReport
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.
- See Also:
-
isWriteHtml
Returns if the report writes html or javascript code.- Returns:
true
if the report writes html, andfalse
if the report writes javascript code
-
print
Description copied from class:A_CmsReport
Prints a String to the report, using the indicated formatting.Use the constants starting with
FORMAT
from this interface to indicate which formatting to use.- Specified by:
print
in classA_CmsReport
- Parameters:
value
- the message container to addformat
- the formatting to use for the output- See Also:
-
println
Description copied from interface:I_CmsReport
Adds a line break to the report.- See Also:
-
println
Description copied from interface:I_CmsReport
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- See Also:
-
getLineBreak
Returns the correct line break notation depending on the output style of this report.- Returns:
- the correct line break notation
-