com.opencms.report
Interface I_CmsReport

All Known Implementing Classes:
CmsHtmlReport, CmsShellReport

public interface I_CmsReport

This is the interface for the report classes which are used to process the output during database import and export operations.

Version:
$Revision: 1.5 $
Author:
Hanjo Riege, Alexander Kandzior (a.kandzior@alkacon.com)

Field Summary
static String C_BUNDLE_NAME
          The name of the property file
static int C_FORMAT_DEFAULT
           
static int C_FORMAT_HEADLINE
           
static int C_FORMAT_NOTE
           
static int C_FORMAT_OK
           
static int C_FORMAT_WARNING
           
 
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.
 

Field Detail

C_FORMAT_DEFAULT

public static final int C_FORMAT_DEFAULT
See Also:
Constant Field Values

C_FORMAT_WARNING

public static final int C_FORMAT_WARNING
See Also:
Constant Field Values

C_FORMAT_HEADLINE

public static final int C_FORMAT_HEADLINE
See Also:
Constant Field Values

C_FORMAT_NOTE

public static final int C_FORMAT_NOTE
See Also:
Constant Field Values

C_FORMAT_OK

public static final int C_FORMAT_OK
See Also:
Constant Field Values

C_BUNDLE_NAME

public static final String C_BUNDLE_NAME
The name of the property file

See Also:
Constant Field Values
Method Detail

println

public void println()
Adds a line break to the report.


print

public void print(String value)
Prints a String to the report.

Parameters:
value - the String to add

println

public void println(String value)
Prints a String with line break to the report.

Parameters:
value - the String to add

print

public void print(String value,
                  int format)
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.

Parameters:
value - the String to add
format - the formatting to use for the output

println

public void println(String value,
                    int format)
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.

Parameters:
value - the String to add
format - the formatting to use for the output

println

public 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.

Parameters:
value - the CmsPageLinks object to add to the report

println

public 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.

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


getReportUpdate

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

hasBrokenLinks

public boolean hasBrokenLinks()
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 println(CmsPageLinks) method.

Returns:
true if broken links where reported, false otherwise

key

public String key(String keyName)
Gets the localized resource string for a given message key.

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

Parameters:
keyName - the key for the desired string
Returns:
the resource string for the given key
See Also:
CmsMessages.key(String)