org.opencms.report
Class CmsShellReport

java.lang.Object
  extended by org.opencms.report.A_CmsReport
      extended by org.opencms.report.CmsHtmlReport
          extended by org.opencms.report.CmsPrintStreamReport
              extended by org.opencms.report.CmsShellReport
All Implemented Interfaces:
I_CmsReport

public class CmsShellReport
extends CmsPrintStreamReport

Report class used for the shell.

It stores nothing. It just prints everything to System.out

.

Since:
6.0.0
Version:
$Revision: 1.32 $
Author:
Alexander Kandzior, Jan Baudisch

Field Summary
 
Fields inherited from class org.opencms.report.CmsHtmlReport
LINEBREAK, LINEBREAK_TRADITIONAL
 
Fields 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
CmsShellReport(java.util.Locale locale)
          Constructs a new report using the provided locale for the output language.
 
Method Summary
 java.lang.String getReportUpdate()
          Updates this report, this processes all new output added since the last call to this method.
 void print(CmsMessageContainer container)
          Prints a localized message to the report.
 void print(CmsMessageContainer container, int format)
          Prints a localized message to the report, using the indicated formatting.
 void println()
          Adds a line break to the report.
 void println(CmsMessageContainer container)
          Prints a localized message to the report.
 void println(CmsMessageContainer container, int format)
          Prints a localized message to the report, using the indicated formatting.
 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 printMessageWithParam(CmsMessageContainer container, java.lang.Object param)
          Prints a localized message followed by a parametera and dots to the report.
 void printMessageWithParam(int m, int n, CmsMessageContainer container, java.lang.Object param)
          Convenience method to print a localized message, followed by a parameter and dots to the report.
 void start()
          Starts the report.
 
Methods inherited from class org.opencms.report.CmsPrintStreamReport
close, finish, getLineBreak, print
 
Methods inherited from class org.opencms.report.CmsHtmlReport
isWriteHtml
 
Methods inherited from class org.opencms.report.A_CmsReport
addError, addWarning, formatRuntime, getErrors, getLastEntryTime, getLocale, getMessages, getRuntime, getSiteRoot, getWarnings, hasError, hasWarning, init, print, println, println, removeSiteRoot, resetRuntime, setLastEntryTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsShellReport

public CmsShellReport(java.util.Locale locale)
Constructs a new report using the provided locale for the output language.

Parameters:
locale - the locale to use for the output language
Method Detail

getReportUpdate

public java.lang.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
Overrides:
getReportUpdate in class CmsPrintStreamReport
Returns:
new elements that have been added to the report and not yet processed.
See Also:
I_CmsReport.getReportUpdate()

print

public void print(CmsMessageContainer container)
Description copied from interface: I_CmsReport
Prints a localized message to the report.

Specified by:
print in interface I_CmsReport
Overrides:
print in class A_CmsReport
Parameters:
container - the String to add
See Also:
A_CmsReport.print(org.opencms.i18n.CmsMessageContainer)

print

public void print(CmsMessageContainer container,
                  int format)
Description copied from interface: I_CmsReport
Prints a localized message 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 interface I_CmsReport
Overrides:
print in class A_CmsReport
Parameters:
container - the String to add
format - the formatting to use for the output
See Also:
A_CmsReport.print(org.opencms.i18n.CmsMessageContainer, int)

println

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

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

println

public void println(CmsMessageContainer container)
Description copied from interface: I_CmsReport
Prints a localized message to the report.

Specified by:
println in interface I_CmsReport
Overrides:
println in class A_CmsReport
Parameters:
container - the message container to add
See Also:
A_CmsReport.println(org.opencms.i18n.CmsMessageContainer)

println

public void println(CmsMessageContainer container,
                    int format)
Description copied from interface: I_CmsReport
Prints a localized message to the report, using the indicated formatting.

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

Specified by:
println in interface I_CmsReport
Overrides:
println in class A_CmsReport
Parameters:
container - the message container to add
format - the formatting to use for the output
See Also:
A_CmsReport.println(org.opencms.i18n.CmsMessageContainer, int)

println

public void println(java.lang.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
Overrides:
println in class CmsPrintStreamReport
Parameters:
t - the exception to add
See Also:
CmsPrintStreamReport.println(java.lang.Throwable)

printMessageWithParam

public void printMessageWithParam(CmsMessageContainer container,
                                  java.lang.Object param)
Description copied from interface: I_CmsReport
Prints a localized message followed by a parametera and dots to the report.

Specified by:
printMessageWithParam in interface I_CmsReport
Overrides:
printMessageWithParam in class A_CmsReport
Parameters:
container - the Message to add
param - the Parameter to add
See Also:
A_CmsReport.printMessageWithParam(org.opencms.i18n.CmsMessageContainer, java.lang.Object)

printMessageWithParam

public void printMessageWithParam(int m,
                                  int n,
                                  CmsMessageContainer container,
                                  java.lang.Object param)
Description copied from interface: I_CmsReport
Convenience 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:
printMessageWithParam in interface I_CmsReport
Overrides:
printMessageWithParam in class A_CmsReport
Parameters:
m - the number of the report output
n - the total number of report outputs
container - the Message to add
param - the Parameter to add
See Also:
A_CmsReport.printMessageWithParam(int, int, org.opencms.i18n.CmsMessageContainer, java.lang.Object)

start

public void start()
Description copied from class: CmsPrintStreamReport
Starts the report.

Overrides:
start in class CmsPrintStreamReport
See Also:
CmsPrintStreamReport.start()