Search in sources :

Example 1 with Severity

use of org.drools.verifier.report.components.Severity in project drools by kiegroup.

the class PlainTextReportWriter method writeReport.

public void writeReport(OutputStream out, VerifierReport result) throws IOException {
    StringBuffer str = new StringBuffer();
    for (Severity severity : Severity.values()) {
        Collection<VerifierMessageBase> messages = result.getBySeverity(severity);
        str.append("************* ");
        str.append(severity.getTuple());
        str.append(" ");
        str.append(messages.size());
        str.append(" ******************\n");
        for (VerifierMessageBase message : messages) {
            str.append(message);
            str.append("\n");
        }
        str.append("\n");
    }
    out.write(str.toString().getBytes(IoUtils.UTF8_CHARSET));
}
Also used : VerifierMessageBase(org.drools.verifier.report.components.VerifierMessageBase) Severity(org.drools.verifier.report.components.Severity)

Aggregations

Severity (org.drools.verifier.report.components.Severity)1 VerifierMessageBase (org.drools.verifier.report.components.VerifierMessageBase)1