public abstract class A_CmsReport extends java.lang.Object implements I_CmsReport
FORMAT_DEFAULT, FORMAT_ERROR, FORMAT_HEADLINE, FORMAT_NOTE, FORMAT_OK, FORMAT_WARNING, REPORT_TYPE_EXTENDED, REPORT_TYPE_SIMPLE| Constructor and Description |
|---|
A_CmsReport() |
| Modifier and Type | Method and Description |
|---|---|
void |
addError(java.lang.Object obj)
Adds an error object to the list of errors that occurred during the report.
|
void |
addWarning(java.lang.Object obj)
Adds a warning object to the list of warnings that occurred during the report.
|
java.lang.String |
formatRuntime()
Formats the runtime formatted as "hh:mm:ss".
|
java.util.List<java.lang.Object> |
getErrors()
Returns a list of all errors that occurred during the report.
|
long |
getLastEntryTime()
Returns the time of last report entry.
|
java.util.Locale |
getLocale()
Returns the locale this report was initialized with.
|
protected CmsMessages |
getMessages()
Returns the default report message bundle.
|
java.lang.String |
getReportUpdate(I_CmsReportUpdateFormatter formatter)
Fetches the report update for this report since the last time this method was called.
|
long |
getRuntime()
Returns the time this report has been running.
|
java.lang.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. |
java.util.List<java.lang.Object> |
getWarnings()
Returns a list of all warnings that occurred during the report.
|
boolean |
hasError()
Returns if the report generated an error output.
|
boolean |
hasWarning()
Returns if the report generated a warning output.
|
protected void |
init(java.util.Locale locale,
java.lang.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(java.lang.String value)
Prints a String to the report.
|
protected abstract void |
print(java.lang.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(java.lang.String value)
Prints a String with line break to the report.
|
protected void |
println(java.lang.String value,
int format)
Prints a String with line break to the report, using the indicated formatting.
|
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.
|
java.lang.String |
removeSiteRoot(java.lang.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.
|
protected void |
setLastEntryTime(long time)
Sets the time of the last report entry.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetReportUpdate, println, printlnpublic A_CmsReport()
public void addError(java.lang.Object obj)
I_CmsReportaddError in interface I_CmsReportobj - the error objectI_CmsReport.addError(java.lang.Object)public void addWarning(java.lang.Object obj)
I_CmsReportaddWarning in interface I_CmsReportobj - the error objectI_CmsReport.addWarning(java.lang.Object)public java.lang.String formatRuntime()
I_CmsReportformatRuntime in interface I_CmsReportI_CmsReport.formatRuntime()public java.util.List<java.lang.Object> getErrors()
I_CmsReportgetErrors in interface I_CmsReportI_CmsReport.getErrors()public long getLastEntryTime()
I_CmsReportWill return zero if no entry has been written.
getLastEntryTime in interface I_CmsReportI_CmsReport.getLastEntryTime()public java.util.Locale getLocale()
I_CmsReportgetLocale in interface I_CmsReportI_CmsReport.getLocale()public java.lang.String getReportUpdate(I_CmsReportUpdateFormatter formatter)
I_CmsReportgetReportUpdate in interface I_CmsReportformatter - the formatter to use for formatting the report outputI_CmsReport.getReportUpdate(org.opencms.report.I_CmsReportUpdateFormatter)public long getRuntime()
I_CmsReportgetRuntime in interface I_CmsReportI_CmsReport.getRuntime()public java.lang.String getSiteRoot()
null if the original site root has not been set.getSiteRoot in interface I_CmsReportpublic java.util.List<java.lang.Object> getWarnings()
I_CmsReportgetWarnings in interface I_CmsReportI_CmsReport.getWarnings()public boolean hasError()
I_CmsReporthasError in interface I_CmsReportI_CmsReport.hasError()public boolean hasWarning()
I_CmsReporthasWarning in interface I_CmsReportI_CmsReport.hasWarning()public void print(CmsMessageContainer container)
I_CmsReportprint 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_CmsReportprintln 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, java.lang.Object param)
I_CmsReportprintMessageWithParam 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, java.lang.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 java.lang.String removeSiteRoot(java.lang.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_CmsReportresetRuntime in interface I_CmsReportI_CmsReport.resetRuntime()protected CmsMessages getMessages()
protected void init(java.util.Locale locale, java.lang.String siteRoot)
locale - the locale for this reportsiteRoot - the site root of the user who started this report (may be null)protected void print(java.lang.String value)
value - the String to addprotected abstract void print(java.lang.String value, int format)
Use the constants 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(java.lang.String value)
value - the message container to addprotected void println(java.lang.String value, int format)
Use the constants starting with C_FORMAT from this interface
to indicate which formatting to use.
value - the String to addformat - the formatting to use for the outputprotected void setLastEntryTime(long time)
time - the time of the actual entry