|
||||||
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(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 |
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. |
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 |
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. |
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(java.lang.Object obj)
I_CmsReport
addError
in interface I_CmsReport
obj
- the error objectI_CmsReport.addError(java.lang.Object)
public void addWarning(java.lang.Object obj)
I_CmsReport
addWarning
in interface I_CmsReport
obj
- the error objectI_CmsReport.addWarning(java.lang.Object)
public java.lang.String formatRuntime()
I_CmsReport
formatRuntime
in interface I_CmsReport
I_CmsReport.formatRuntime()
public java.util.List getErrors()
I_CmsReport
getErrors
in interface I_CmsReport
I_CmsReport.getErrors()
public java.util.Locale getLocale()
I_CmsReport
getLocale
in interface I_CmsReport
I_CmsReport.getLocale()
public long getRuntime()
I_CmsReport
getRuntime
in interface I_CmsReport
I_CmsReport.getRuntime()
public java.lang.String getSiteRoot()
null
if the original site root has not been set.
getSiteRoot
in interface I_CmsReport
public java.util.List getWarnings()
I_CmsReport
getWarnings
in interface I_CmsReport
I_CmsReport.getWarnings()
public boolean hasError()
I_CmsReport
hasError
in interface I_CmsReport
I_CmsReport.hasError()
public boolean hasWarning()
I_CmsReport
hasWarning
in interface I_CmsReport
I_CmsReport.hasWarning()
public void print(CmsMessageContainer container)
I_CmsReport
print
in interface I_CmsReport
container
- 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_CmsReport
container
- 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_CmsReport
container
- 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_CmsReport
container
- 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_CmsReport
printMessageWithParam
in interface I_CmsReport
container
- 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_CmsReport
The output follows the pattern: ( 3 / 8 ) Deleting filename.txt ...
printMessageWithParam
in interface I_CmsReport
m
- 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_CmsReport
resourcename
- the resource name (full path)
CmsRequestContext.removeSiteRoot(String)
public void resetRuntime()
I_CmsReport
resetRuntime
in interface I_CmsReport
I_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 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(java.lang.String value)
value
- the message container to addprotected void println(java.lang.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 outputprotected void setLastEntryTime(long time)
time
- the time of the actual entrypublic long getLastEntryTime()
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |