public class AbstractReport extends Object
Constructor and Description |
---|
AbstractReport()
Default constructor.
|
AbstractReport(String message)
Constructor.
|
AbstractReport(String message,
int severity)
Constructor.
|
AbstractReport(Throwable exception)
Constructor.
|
AbstractReport(Throwable exception,
int severity)
Constructor.
|
AbstractReport(Throwable exception,
String message)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Throwable |
getException()
Returns the exception this report is based on, if any.
|
String |
getMessage()
Returns the report message.
|
int |
getSeverity()
Returns the status of this report.
|
boolean |
hasException()
Whether this report is based upon an exception.
|
protected void |
setException(Throwable exception)
Sets the exception this report is based on.
|
protected void |
setMessage(String message)
Sets the report' message.
|
public AbstractReport()
Default constructor.
Sets the severity toIStatus.ERROR
.public AbstractReport(Throwable exception)
Constructor.
Sets the severity toIStatus.ERROR
.exception
- the exception this report is based onpublic AbstractReport(String message)
Constructor.
Sets the severity toIStatus.ERROR
.message
- the report messagepublic AbstractReport(String message, int severity)
Constructor.
Sets the severity toIStatus.ERROR
.message
- the report messageseverity
- the severity of the reportpublic AbstractReport(Throwable exception, String message)
Constructor.
Sets the severity toIStatus.ERROR
.exception
- the exception this report is based onmessage
- the report messagepublic AbstractReport(Throwable exception, int severity)
exception
- the exception this report is based onseverity
- the severity of the reportpublic String getMessage()
public boolean hasException()
true
, if this report is based upon an exception, false
otherwisepublic Throwable getException()
null
hasException()
public int getSeverity()
protected void setException(Throwable exception)
exception
- the exception this report is based onhasException()
protected void setMessage(String message)
message
- the report message to setCopyright © 2017. All rights reserved.