|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opencms.report.A_CmsReport
public abstract class A_CmsReport
Base report class.
| Field Summary |
|---|
| 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 | |
|---|---|
A_CmsReport()
|
|
| Method Summary | |
|---|---|
void |
addError(Object obj)
Adds an error object to the list of errors that occured during the report. |
String |
formatRuntime()
Formats the runtime formatted as "hh:mm:ss". |
List |
getErrors()
Returns a list of all errors that occured during the report. |
Locale |
getLocale()
Returns the locale this report was initialized with. |
long |
getRuntime()
Returns the time this report has been running. |
String |
getSiteRoot()
Returns the original site root of the user who started this report, or null if the original site root has not been set. |
boolean |
hasError()
Returns if the report generated an error output. |
protected void |
init(Locale locale,
String siteRoot)
Initializes some member variables for this report. |
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. |
protected void |
print(String value)
Prints a String to the report. |
protected abstract void |
print(String value,
int format)
Prints a String to the report, using the indicated formatting. |
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. |
protected void |
println(String value)
Prints a String with line break to the report. |
protected void |
println(String value,
int format)
Prints a String with line break to the report, using the indicated formatting. |
void |
printMessageWithParam(CmsMessageContainer container,
Object param)
Prints a localized message followed by a parametera and dots to the report. |
void |
printMessageWithParam(int m,
int n,
CmsMessageContainer container,
Object param)
Convenience method to print a localized message, followed by a parameter and dots to the report. |
String |
removeSiteRoot(String resourcename)
Removes the report site root prefix from the absolute path in the resource name, that is adjusts the resource name for the report site root. |
void |
resetRuntime()
Resets the runtime to 0 milliseconds. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.opencms.report.I_CmsReport |
|---|
getReportUpdate, println, println |
| Constructor Detail |
|---|
public A_CmsReport()
| Method Detail |
|---|
public void addError(Object obj)
I_CmsReport
addError in interface I_CmsReportobj - the error objectI_CmsReport.addError(java.lang.Object)public String formatRuntime()
I_CmsReport
formatRuntime in interface I_CmsReportI_CmsReport.formatRuntime()public List getErrors()
I_CmsReport
getErrors in interface I_CmsReportI_CmsReport.getErrors()public Locale getLocale()
I_CmsReport
getLocale in interface I_CmsReportI_CmsReport.getLocale()public long getRuntime()
I_CmsReport
getRuntime in interface I_CmsReportI_CmsReport.getRuntime()public String getSiteRoot()
null if the original site root has not been set.
getSiteRoot in interface I_CmsReportpublic boolean hasError()
I_CmsReport
hasError in interface I_CmsReportI_CmsReport.hasError()public void print(CmsMessageContainer container)
I_CmsReport
print in interface I_CmsReportcontainer - the String to addI_CmsReport.print(org.opencms.i18n.CmsMessageContainer)
public void print(CmsMessageContainer container,
int format)
I_CmsReport
Use the contants starting with FORMAT from this interface
to indicate which formatting to use.
print in interface I_CmsReportcontainer - the String to addformat - the formatting to use for the outputI_CmsReport.print(org.opencms.i18n.CmsMessageContainer, int)public void println(CmsMessageContainer container)
I_CmsReport
println in interface I_CmsReportcontainer - the message container to addI_CmsReport.println(org.opencms.i18n.CmsMessageContainer)
public void println(CmsMessageContainer container,
int format)
I_CmsReport
Use the contants starting with FORMAT from this interface
to indicate which formatting to use.
println in interface I_CmsReportcontainer - the message container to addformat - the formatting to use for the outputI_CmsReport.println(org.opencms.i18n.CmsMessageContainer, int)
public void printMessageWithParam(CmsMessageContainer container,
Object param)
I_CmsReport
printMessageWithParam in interface I_CmsReportcontainer - the Message to addparam - the Parameter to addI_CmsReport.printMessageWithParam(org.opencms.i18n.CmsMessageContainer,Object)
public void printMessageWithParam(int m,
int n,
CmsMessageContainer container,
Object param)
I_CmsReportThe output follows the pattern: ( 3 / 8 ) Deleting filename.txt ...
printMessageWithParam in interface I_CmsReportm - the number of the report outputn - the total number of report outputscontainer - the Message to addparam - the Parameter to addI_CmsReport.printMessageWithParam(int,int,org.opencms.i18n.CmsMessageContainer,Object)public String removeSiteRoot(String resourcename)
If the site root for this report has not been set, or the resource name does not start with the report site root, the name it is left untouched.
removeSiteRoot in interface I_CmsReportresourcename - the resource name (full path)
CmsRequestContext.removeSiteRoot(String)public void resetRuntime()
I_CmsReport
resetRuntime in interface I_CmsReportI_CmsReport.resetRuntime()
protected void init(Locale locale,
String siteRoot)
locale - the locale for this reportsiteRoot - the site root of the user who started this report (may be null)protected void print(String value)
value - the String to add
protected abstract void print(String value,
int format)
Use the contants starting with FORMAT from this interface
to indicate which formatting to use.
value - the message container to addformat - the formatting to use for the outputprotected void println(String value)
value - the message container to add
protected void println(String value,
int format)
Use the contants starting with C_FORMAT from this interface
to indicate which formatting to use.
value - the String to addformat - the formatting to use for the output
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||