org.opencms.report
Class CmsHtmlReport

java.lang.Object
  extended byorg.opencms.report.A_CmsReport
      extended byorg.opencms.report.CmsHtmlReport
All Implemented Interfaces:
I_CmsReport

public class CmsHtmlReport
extends A_CmsReport

HTML report output to be used for import / export / publish operations in the entire OpenCms system.

Since:
6.0.0
Version:
$Revision: 1.29 $
Author:
Alexander Kandzior, Thomas Weckert, Jan Baudisch

Field Summary
 
Fields inherited from interface org.opencms.report.I_CmsReport
BUNDLE_NAME, FORMAT_DEFAULT, FORMAT_ERROR, FORMAT_HEADLINE, FORMAT_NOTE, FORMAT_OK, FORMAT_WARNING, REPORT_TYPE_EXTENDED, REPORT_TYPE_SIMPLE
 
Constructor Summary
  CmsHtmlReport(Locale locale)
          Constructs a new report using the provided locale and the default OpenCms workplace resource bundle for the output language.
  CmsHtmlReport(Locale locale, boolean writeHtml)
          Constructs a new report using the provided locale and the default OpenCms workplace resource bundle for the output language.
  CmsHtmlReport(String bundleName, Locale locale)
          Constructs a new report using the provided locale and resource bundle for the output language.
protected CmsHtmlReport(String bundleName, Locale locale, boolean writeHtml)
          Constructs a new report using the provided locale and resource bundle for the output language.
 
Method Summary
protected  String getLineBreak()
          Returns the corrent linebreak notation depending on the output style of thsi report.
 String getReportUpdate()
          Updates this report, this processes all new output added since the last call to this method.
 void print(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(Throwable t)
          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
addBundle, addError, formatRuntime, getErrors, getLocale, getRuntime, hasError, init, key, print, print, print, println, println, println, println, printMessageWithParam, printMessageWithParam, resetRuntime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsHtmlReport

public CmsHtmlReport(Locale locale)
Constructs a new report using the provided locale and the default OpenCms workplace resource bundle for the output language.

Parameters:
locale - a locale to use for the output language
See Also:
I_CmsReport.BUNDLE_NAME

CmsHtmlReport

public CmsHtmlReport(Locale locale,
                     boolean writeHtml)
Constructs a new report using the provided locale and the default OpenCms workplace resource bundle for the output language.

This constructor is reserved for older report threads that still use XML templates to generate their output. It allows to specifiy to write HTML instead of JavaScript output.

Parameters:
locale - the locale to use for the report output messages
writeHtml - true, if this report should generate HTML instead of JavaScript output
See Also:
I_CmsReport.BUNDLE_NAME

CmsHtmlReport

public CmsHtmlReport(String bundleName,
                     Locale locale)
Constructs a new report using the provided locale and resource bundle for the output language.

Parameters:
locale - the locale to use for the report output messages
bundleName - the name of the resource bundle with localized strings

CmsHtmlReport

protected CmsHtmlReport(String bundleName,
                        Locale locale,
                        boolean writeHtml)
Constructs a new report using the provided locale and resource bundle for the output language.

This constructor is reserved for older report threads that still use XML templates to generate their output. It allows to specifiy to write HTML instead of JavaScript output.

Parameters:
bundleName - the name of the resource bundle with localized strings
locale - the locale to use for the report output messages
writeHtml - true, if this report should generate HTML instead of JavaScript output
Method Detail

getReportUpdate

public String 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:
I_CmsReport.getReportUpdate()

print

public void print(String value,
                  int format)
Description copied from class: A_CmsReport
Prints a String to the report, using the indicated formatting.

Use the contants starting with FORMAT from this interface to indicate which formatting to use.

Specified by:
print in class A_CmsReport
Parameters:
value - the message container to add
format - the formatting to use for the output
See Also:
A_CmsReport.print(java.lang.String, int)

println

public void println()
Description copied from interface: I_CmsReport
Adds a line break to the report.

See Also:
I_CmsReport.println()

println

public void println(Throwable t)
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:
I_CmsReport.println(java.lang.Throwable)

getLineBreak

protected String getLineBreak()
Returns the corrent linebreak notation depending on the output style of thsi report.

Returns:
the corrent linebreak notation