Package org.opencms.publish
Class CmsPublishReport
java.lang.Object
org.opencms.report.A_CmsReport
org.opencms.report.CmsHtmlReport
org.opencms.report.CmsPrintStreamReport
org.opencms.publish.CmsPublishReport
- All Implemented Interfaces:
I_CmsReport
Report class used for the publish operations.
It stores nothing. It just prints everything to a temporary file.
- Since:
- 6.5.5
-
Field Summary
FieldsFields inherited from class org.opencms.report.CmsHtmlReport
LINEBREAK, LINEBREAK_TRADITIONALFields 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
ConstructorsModifierConstructorDescriptionprotectedCmsPublishReport(Locale locale) Constructs a new publish report using the provided locale for the output language. -
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.protected static CmsPrintStreamReportdecorate(I_CmsReport report) Returns a publish report instance that writes to the given report as well as to the given temporary file.byte[]Returns the contents of the publish report as byte array.Returns a list of all errors that occurred during the report.Updates 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.Returns a list of all warnings that occurred during the report.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.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.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.voidResets the runtime to 0 milliseconds.Methods inherited from class org.opencms.report.CmsPrintStreamReport
close, finish, getLineBreak, print, startMethods inherited from class org.opencms.report.CmsHtmlReport
isWriteHtmlMethods inherited from class org.opencms.report.A_CmsReport
formatRuntime, getLastEntryTime, getLocale, getMessages, getRuntime, getSiteRoot, hasError, hasWarning, init, print, println, println, removeSiteRoot, setLastEntryTime
-
Field Details
-
m_outputStream
The output stream.
-
-
Constructor Details
-
CmsPublishReport
Constructs a new publish report using the provided locale for the output language.- Parameters:
locale- the locale to use for the output language
-
-
Method Details
-
decorate
Returns a publish report instance that writes to the given report as well as to the given temporary file.- Parameters:
report- the report to decorate- Returns:
- the publish report
-
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- Overrides:
addErrorin classA_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- Overrides:
addWarningin classA_CmsReport- Parameters:
obj- the error object- See Also:
-
getContents
Returns the contents of the publish report as byte array.- Returns:
- the contents of the publish report
-
getErrors
Description copied from interface:I_CmsReportReturns a list of all errors that occurred during the report.- Specified by:
getErrorsin interfaceI_CmsReport- Overrides:
getErrorsin classA_CmsReport- Returns:
- an error list that occurred during the report
- See Also:
-
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.
- Specified by:
getReportUpdatein interfaceI_CmsReport- Overrides:
getReportUpdatein classCmsPrintStreamReport- 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:
-
getWarnings
Description copied from interface:I_CmsReportReturns a list of all warnings that occurred during the report.- Specified by:
getWarningsin interfaceI_CmsReport- Overrides:
getWarningsin classA_CmsReport- Returns:
- a warning list that occurred during the report
- See Also:
-
print
Description copied from interface:I_CmsReportPrints a localized message to the report.- Specified by:
printin interfaceI_CmsReport- Overrides:
printin classA_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- Overrides:
printin classA_CmsReport- Parameters:
container- the String to addformat- the formatting to use for the output- See Also:
-
println
Description copied from interface:I_CmsReportAdds a line break to the report.- Specified by:
printlnin interfaceI_CmsReport- Overrides:
printlnin classCmsPrintStreamReport- See Also:
-
println
Description copied from interface:I_CmsReportPrints a localized message to the report.- Specified by:
printlnin interfaceI_CmsReport- Overrides:
printlnin classA_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- Overrides:
printlnin classA_CmsReport- Parameters:
container- the message container to addformat- the formatting to use for the output- 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.
- Specified by:
printlnin interfaceI_CmsReport- Overrides:
printlnin classCmsPrintStreamReport- Parameters:
t- the exception to add- 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- Overrides:
printMessageWithParamin classA_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- Overrides:
printMessageWithParamin classA_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:
-
resetRuntime
Description copied from interface:I_CmsReportResets the runtime to 0 milliseconds.- Specified by:
resetRuntimein interfaceI_CmsReport- Overrides:
resetRuntimein classA_CmsReport- See Also:
-