public class CmsWorkplaceReport extends A_CmsReport
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.
| Modifier and Type | Field and Description |
|---|---|
static int |
FORMAT_NEWLINE
Format constant for newlines.
|
FORMAT_DEFAULT, FORMAT_ERROR, FORMAT_HEADLINE, FORMAT_NOTE, FORMAT_OK, FORMAT_WARNING, REPORT_TYPE_EXTENDED, REPORT_TYPE_SIMPLE| Constructor and Description |
|---|
CmsWorkplaceReport(java.util.Locale locale,
java.lang.String siteRoot,
boolean isTransient,
java.lang.Object logChannel)
Constructs a new report using the provided locale for the output language.
|
CmsWorkplaceReport(java.util.Locale locale,
java.lang.String siteRoot,
java.lang.Object logChannel)
Constructs a new report using the provided locale for the output language.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getReportUpdate()
Updates this report, this processes all new output added since
the last call to this method.
|
java.lang.String |
getReportUpdate(I_CmsReportUpdateFormatter formatter)
Fetches the report update for this report since the last time this method was called.
|
void |
print(java.lang.String value,
int format)
Prints a String to the report, using the indicated formatting.
|
void |
println()
Adds a line break to the report.
|
void |
println(java.lang.Throwable t)
Adds an Exception to the report, ensuring that the Exception content is
processed to generate a valid output esp. for HTML pages.
|
void |
rewind()
Rewinds the report update to the start of the report.
|
addError, addWarning, formatRuntime, getErrors, getLastEntryTime, getLocale, getMessages, getRuntime, getSiteRoot, getWarnings, hasError, hasWarning, init, print, print, print, println, println, println, println, printMessageWithParam, printMessageWithParam, removeSiteRoot, resetRuntime, setLastEntryTimepublic static final int FORMAT_NEWLINE
public CmsWorkplaceReport(java.util.Locale locale, java.lang.String siteRoot, boolean isTransient, java.lang.Object logChannel)
locale - the locale to use for the output languagesiteRoot - the site root of the user who started this report (may be null)isTransient - If set to true nothing is kept in memorylogChannel - the log channel to send the report output to (or null if this shouldn't be done)public CmsWorkplaceReport(java.util.Locale locale, java.lang.String siteRoot, java.lang.Object logChannel)
locale - the locale to use for the output languagesiteRoot - the site root of the user who started this report (may be null)logChannel - the log channel to send the report output to (or null if this shouldn't be done)public java.lang.String getReportUpdate()
I_CmsReportThis 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.
I_CmsReport.getReportUpdate()public java.lang.String getReportUpdate(I_CmsReportUpdateFormatter formatter)
I_CmsReportgetReportUpdate in interface I_CmsReportgetReportUpdate in class A_CmsReportformatter - the formatter to use for formatting the report outputA_CmsReport.getReportUpdate(org.opencms.report.I_CmsReportUpdateFormatter)public void print(java.lang.String value, int format)
A_CmsReport
Use the constants starting with FORMAT from this interface
to indicate which formatting to use.
print in class A_CmsReportvalue - the message container to addformat - the formatting to use for the outputA_CmsReport.print(java.lang.String, int)public void println()
I_CmsReportI_CmsReport.println()public void println(java.lang.Throwable t)
I_CmsReportThe exception will be stored and the output will later be processed in a special way.
t - the exception to addI_CmsReport.println(java.lang.Throwable)public void rewind()