|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface I_CmsReport
This is the interface for the report classes which are used for the output during operations that run on a spearate Thread in OpenCms, like publish, import, export etc.
Field Summary | |
---|---|
static int |
FORMAT_DEFAULT
Indicates default formatting. |
static int |
FORMAT_ERROR
Indicates error formatting. |
static int |
FORMAT_HEADLINE
Indicates headline formatting. |
static int |
FORMAT_NOTE
Indicates note formatting. |
static int |
FORMAT_OK
Indicates OK formatting. |
static int |
FORMAT_WARNING
Indicates warning formatting. |
static java.lang.String |
REPORT_TYPE_EXTENDED
Request parameter value that this report should create an "extended" output. |
static java.lang.String |
REPORT_TYPE_SIMPLE
Request parameter value that this report should create a "simple" output. |
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. |
java.util.Locale |
getLocale()
Returns the locale this report was initialized with. |
java.lang.String |
getReportUpdate()
Updates this report, this processes all new output added since the last call to this method. |
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. |
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. |
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. |
Field Detail |
---|
static final int FORMAT_DEFAULT
static final int FORMAT_ERROR
static final int FORMAT_HEADLINE
static final int FORMAT_NOTE
static final int FORMAT_OK
static final int FORMAT_WARNING
static final java.lang.String REPORT_TYPE_EXTENDED
static final java.lang.String REPORT_TYPE_SIMPLE
Method Detail |
---|
void addError(java.lang.Object obj)
obj
- the error objectvoid addWarning(java.lang.Object obj)
obj
- the error objectjava.lang.String formatRuntime()
java.util.List getErrors()
java.util.Locale getLocale()
java.lang.String getReportUpdate()
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.
long getRuntime()
java.lang.String getSiteRoot()
null
if the original site root has not been set.
java.util.List getWarnings()
boolean hasError()
boolean hasWarning()
void print(CmsMessageContainer container)
container
- the String to addvoid print(CmsMessageContainer container, int format)
Use the contants starting with FORMAT
from this interface
to indicate which formatting to use.
container
- the String to addformat
- the formatting to use for the outputvoid println()
void println(CmsMessageContainer container)
container
- the message container to addvoid println(CmsMessageContainer container, int format)
Use the contants starting with FORMAT
from this interface
to indicate which formatting to use.
container
- the message container to addformat
- the formatting to use for the outputvoid println(java.lang.Throwable t)
The exception will be stored and the output will later be processed in a special way.
t
- the exception to addvoid printMessageWithParam(CmsMessageContainer container, java.lang.Object param)
container
- the Message to addparam
- the Parameter to addvoid printMessageWithParam(int m, int n, CmsMessageContainer container, java.lang.Object param)
The output follows the pattern: ( 3 / 8 ) Deleting filename.txt ...
m
- the number of the report outputn
- the total number of report outputscontainer
- the Message to addparam
- the Parameter to addjava.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.
resourcename
- the resource name (full path)
CmsRequestContext.removeSiteRoot(String)
void resetRuntime()
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |