com.github.fge.jsonschema.core.report
Interface ProcessingReport

All Superinterfaces:
Iterable<ProcessingMessage>
All Known Implementing Classes:
AbstractProcessingReport, ConsoleProcessingReport, DevNullProcessingReport, ListProcessingReport

public interface ProcessingReport
extends Iterable<ProcessingMessage>

Interface for a processing report

While you can implement this interface yourself, it is recommended that you extend AbstractProcessingReport instead.


Method Summary
 void debug(ProcessingMessage message)
          Log a message with a level of LogLevel.DEBUG
 void error(ProcessingMessage message)
          Log a message with a level of LogLevel.ERROR
 void fatal(ProcessingMessage message)
          Log a message with a level of LogLevel.FATAL
 LogLevel getExceptionThreshold()
          Get the exception threshold of this report
 LogLevel getLogLevel()
          Get the log level of this report
 void info(ProcessingMessage message)
          Log a message with a level of LogLevel.INFO
 boolean isSuccess()
          Tell whether the report is a success
 void mergeWith(ProcessingReport other)
          Merge another report into this report
 void warn(ProcessingMessage message)
          Log a message with a level of LogLevel.WARNING
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

getLogLevel

LogLevel getLogLevel()
Get the log level of this report

Any message with a log level greater than, or equal to, the result of this method is logged.

Returns:
the log level

getExceptionThreshold

LogLevel getExceptionThreshold()
Get the exception threshold of this report

Any message with a log level greater than, or equal to, the result of this method raises a ProcessingException or any subclass.

Returns:
the exception threshold
See Also:
ProcessingMessage.asException()

debug

void debug(ProcessingMessage message)
           throws ProcessingException
Log a message with a level of LogLevel.DEBUG

It is the responsibility of the implementation to set the log level of the message appropriately.

Parameters:
message - the message
Throws:
ProcessingException - the level of this message grants that an exception is thrown instead
See Also:
getExceptionThreshold(), ProcessingMessage.setLogLevel(LogLevel)

info

void info(ProcessingMessage message)
          throws ProcessingException
Log a message with a level of LogLevel.INFO

It is the responsibility of the implementation to set the log level of the message appropriately.

Parameters:
message - the message
Throws:
ProcessingException - the level of this message grants that an exception is thrown instead
See Also:
getExceptionThreshold(), ProcessingMessage.setLogLevel(LogLevel)

warn

void warn(ProcessingMessage message)
          throws ProcessingException
Log a message with a level of LogLevel.WARNING

It is the responsibility of the implementation to set the log level of the message appropriately.

Parameters:
message - the message
Throws:
ProcessingException - the level of this message grants that an exception is thrown instead
See Also:
getExceptionThreshold(), ProcessingMessage.setLogLevel(LogLevel)

error

void error(ProcessingMessage message)
           throws ProcessingException
Log a message with a level of LogLevel.ERROR

It is the responsibility of the implementation to set the log level of the message appropriately.

Parameters:
message - the message
Throws:
ProcessingException - the level of this message grants that an exception is thrown instead
See Also:
getExceptionThreshold(), ProcessingMessage.setLogLevel(LogLevel)

fatal

void fatal(ProcessingMessage message)
           throws ProcessingException
Log a message with a level of LogLevel.FATAL

It is the responsibility of the implementation to set the log level of the message appropriately.

Parameters:
message - the message
Throws:
ProcessingException - the level of this message grants that an exception is thrown instead
See Also:
getExceptionThreshold(), ProcessingMessage.setLogLevel(LogLevel)

isSuccess

boolean isSuccess()
Tell whether the report is a success

A report is considered successful if no messages with a level of LogLevel.ERROR or higher have been logged.

Returns:
a boolean

mergeWith

void mergeWith(ProcessingReport other)
               throws ProcessingException
Merge another report into this report

Parameters:
other - the other report
Throws:
ProcessingException - a message in the other report has a level granting that an exception be thrown