com.opencms.report
Class CmsHtmlReport

java.lang.Object
  |
  +--com.opencms.report.CmsHtmlReport
All Implemented Interfaces:
I_CmsReport

public class CmsHtmlReport
extends Object
implements I_CmsReport

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

Since:
5.0 rc 1
Version:
$Revision: 1.8 $
Author:
Alexander Kandzior (a.kandzior@alkacon.com)

Field Summary
 
Fields inherited from interface com.opencms.report.I_CmsReport
C_BUNDLE_NAME, C_FORMAT_DEFAULT, C_FORMAT_HEADLINE, C_FORMAT_NOTE, C_FORMAT_OK, C_FORMAT_WARNING
 
Constructor Summary
CmsHtmlReport(String locale)
          Constructs a new report using the provided locale for the output language.
 
Method Summary
 String getReportUpdate()
          Updates this report, this processes all new output added since the last call to this method.
 boolean hasBrokenLinks()
          Returns true if broken links where reported, false otherwise.
 String key(String keyName)
          Gets the localized resource string for a given message key.
 void print(String value)
          Prints a String to the report.
 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(CmsPageLinks value)
          Adds a CmsPageLinks object to the report The object will be stored and the output will later be processed in a special way.
 void println(String value)
          Prints a String with line break to the report.
 void println(String value, int format)
          Prints a String with line break to the report, using the indicated formatting.
 void println(Throwable t)
          Adds an Exception to the report, ensuring that the Exception content is processed to generate a valid output esp. for HTML pages.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsHtmlReport

public CmsHtmlReport(String locale)
Constructs a new report using the provided locale for the output language.

Parameters:
locale - a 2-letter language code according to ISO 639
Method Detail

println

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

Specified by:
println in interface I_CmsReport
See Also:
I_CmsReport.println()

print

public void print(String value)
Description copied from interface: I_CmsReport
Prints a String to the report.

Specified by:
print in interface I_CmsReport
Parameters:
value - the String to add
See Also:
I_CmsReport.print(java.lang.String)

println

public void println(String value)
Description copied from interface: I_CmsReport
Prints a String with line break to the report.

Specified by:
println in interface I_CmsReport
Parameters:
value - the String to add
See Also:
I_CmsReport.println(java.lang.String)

print

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

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

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

println

public void println(String value,
                    int format)
Description copied from interface: I_CmsReport
Prints a String with line break to the report, using the indicated formatting.

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

Specified by:
println in interface I_CmsReport
Parameters:
value - the String to add
format - the formatting to use for the output
See Also:
I_CmsReport.println(java.lang.String, int)

println

public void println(CmsPageLinks value)
Description copied from interface: I_CmsReport
Adds a CmsPageLinks object to the report

The object will be stored and the output will later be processed in a special way.

Specified by:
println in interface I_CmsReport
Parameters:
value - the CmsPageLinks object to add to the report
See Also:
I_CmsReport.println(com.opencms.linkmanagement.CmsPageLinks)

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.

Specified by:
println in interface I_CmsReport
See Also:
I_CmsReport.println(java.lang.Throwable)

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.

Specified by:
getReportUpdate in interface I_CmsReport
Returns:
new elements that have been added to the report and not yet processed.
See Also:
I_CmsReport.getReportUpdate()

hasBrokenLinks

public boolean hasBrokenLinks()
Description copied from interface: I_CmsReport
Returns true if broken links where reported, false otherwise.

Open links where reported if at last one link was added to the report using the I_CmsReport.println(CmsPageLinks) method.

Specified by:
hasBrokenLinks in interface I_CmsReport
Returns:
true if broken links where reported, false otherwise
See Also:
I_CmsReport.hasBrokenLinks()

key

public String key(String keyName)
Description copied from interface: I_CmsReport
Gets the localized resource string for a given message key.

The internal implementation should be passing the keyName to the class CmsMessages.

Specified by:
key in interface I_CmsReport
Parameters:
keyName - the key for the desired string
Returns:
the resource string for the given key
See Also:
I_CmsReport.key(java.lang.String)