public class CheckReport
extends java.lang.Object
implements java.io.Serializable
ProcessTemplateCheck,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
static class |
CheckReport.ReportEntry
Represents an entry in the check report.
|
static class |
CheckReport.ResultType
Constants that define whether the corresponding report or report
entry contains an error message (FAILURE), a warning message
(WARNING), an info message (INFO) or simply a success message (OK).
|
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Locale |
locale
The preferred locale to be used for messages of this check report.
|
protected int |
nextEntryNumber
Keeps the number that is assigned to the next report entry.
|
protected java.util.List<CheckReport.ReportEntry> |
reportEntries
List that keeps the report entries.
|
| Constructor and Description |
|---|
CheckReport(java.net.URI base)
Sets up the check report and assigns it to the given template or instance.
|
CheckReport(java.net.URI base,
java.util.Locale locale)
Sets up the check report and assigns it to the given template or instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addReportEntry(CheckReport.ReportEntry entry)
Adds the designated new entry to the report.
|
void |
addReportEntry(java.lang.String checkID,
CheckReport.ResultType reportEntryType,
java.lang.String message,
java.net.URI... affectedElements)
Adds a new entry to the report.
|
java.net.URI |
getBase()
Returns the process element identifier URI of the template or instance this
check report is assigned to.
|
CheckReport.ResultType |
getCheckResult()
Returns the overall result of all checks which have been run with this
check report.
|
java.util.List<? extends CheckReport.ReportEntry> |
getEntriesForCheckID(java.lang.String checkID)
Returns all check report entries which do have the given checkID
|
CheckReport.ReportEntry |
getLastAddedReportEntry()
Returns the last added report entry
|
java.util.Locale |
getPreferredLocale()
Gets the locale this check report should provide (or at least a fallback of it).
|
java.util.List<? extends CheckReport.ReportEntry> |
getReportEntries()
Returns all report entries that keep the output of the different checks and
are assigned to the check report.
|
java.lang.String |
getReportSummary()
Returns a textual summary of all check report entries.
|
java.lang.String |
getSimpleReportSummary()
Returns a textual summary of all warning and failure check report entries.
|
void |
printReportSummary()
Prints the report summary to STDOUT.
|
protected final java.util.List<CheckReport.ReportEntry> reportEntries
protected int nextEntryNumber
protected java.util.Locale locale
public CheckReport(java.net.URI base)
Uses a URI for identifying the checked object. For the process model
cf. ProcessElementIdentifierTools,
e.g. use the method getTemplateIdentifier for process templates
and getInstanceIdentifier for process instances.
base - The process element identifier URI of the template or instance
this check report is assigned to.public CheckReport(java.net.URI base,
java.util.Locale locale)
Uses a URI for identifying the checked object. For the process model
cf. ProcessElementIdentifierTools,
e.g. use the method getTemplateIdentifier for process templates
and getInstanceIdentifier for process instances.
base - The process element identifier URI of the template or instance
this check report is assigned to.locale - The preferred locale to be used for messages of this check report.public java.net.URI getBase()
public java.util.Locale getPreferredLocale()
public void addReportEntry(java.lang.String checkID,
CheckReport.ResultType reportEntryType,
java.lang.String message,
java.net.URI... affectedElements)
reportEntryType.checkID - The identifier of the check that generates this report
entry.reportEntryType - The severity of this report item.message - The message to report.affectedElements - The process element identifier URIs of the process
elements affected by this report entry.protected void addReportEntry(CheckReport.ReportEntry entry)
reportEntryType.entry - The report entry which to add.public java.util.List<? extends CheckReport.ReportEntry> getReportEntries()
public java.lang.String getReportSummary()
public java.lang.String getSimpleReportSummary()
public void printReportSummary()
public java.util.List<? extends CheckReport.ReportEntry> getEntriesForCheckID(java.lang.String checkID)
checkID - public CheckReport.ReportEntry getLastAddedReportEntry()
public CheckReport.ResultType getCheckResult()