Class AbstractReport
- java.lang.Object
-
- org.eclipse.emfforms.spi.common.report.AbstractReport
-
- Direct Known Subclasses:
AmbiguousRendererPriorityReport
,CustomControlInitFailedReport
,DatabindingFailedReport
,DomainModelReferenceResolutionFailedReport
,ECPRendererDescriptionInitFailedReport
,EMFFormsSpreadsheetReport
,InvalidGridDescriptionReport
,NoRendererFoundReport
,NoRendererServiceReport
,NoViewProviderFoundReport
,RendererInitFailedReport
,RenderingFailedReport
,StatusReport
,ViewModelIsNullReport
,ViewModelServiceNotAvailableReport
,ViewProviderInitFailedReport
public class AbstractReport extends java.lang.Object
Common base type for reports that may be reported.- Since:
- 1.5
- Author:
- emueller
-
-
Constructor Summary
Constructors Constructor Description AbstractReport()
Default constructor with empty message.AbstractReport(java.lang.String message)
Constructor.AbstractReport(java.lang.String message, int severity)
Constructor.AbstractReport(java.lang.String message, int severity, java.lang.Object... arguments)
Constructor with MessageFormat support.AbstractReport(java.lang.String message, java.lang.Object... arguments)
Constructor with MessageFormat support.AbstractReport(java.lang.Throwable exception)
Constructor.AbstractReport(java.lang.Throwable exception, int severity)
Constructor.AbstractReport(java.lang.Throwable exception, java.lang.String message)
Constructor.AbstractReport(java.lang.Throwable exception, java.lang.String message, java.lang.Object... arguments)
Constructor with MessageFormat support.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Throwable
getException()
Returns the exception this report is based on, if any.java.lang.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(java.lang.Throwable exception)
Sets the exception this report is based on.protected void
setMessage(java.lang.String message)
Sets the report' message.
-
-
-
Constructor Detail
-
AbstractReport
public AbstractReport()
Default constructor with empty message. Sets the severity toIStatus.ERROR
.
-
AbstractReport
public AbstractReport(java.lang.Throwable exception)
Constructor. Sets the severity toIStatus.ERROR
.- Parameters:
exception
- the exception this report is based on
-
AbstractReport
public AbstractReport(java.lang.String message)
Constructor. Sets the severity toIStatus.ERROR
.- Parameters:
message
- the report message
-
AbstractReport
public AbstractReport(java.lang.String message, java.lang.Object... arguments)
Constructor with MessageFormat support. Sets the severity toIStatus.ERROR
.- Parameters:
message
- the report messagearguments
- the arguments for the message- Since:
- 1.14
-
AbstractReport
public AbstractReport(java.lang.String message, int severity)
Constructor. Sets the severity to the given severity.- Parameters:
message
- the report messageseverity
- the severity of the report specified as anIStatus
severity code.
-
AbstractReport
public AbstractReport(java.lang.String message, int severity, java.lang.Object... arguments)
Constructor with MessageFormat support.- Parameters:
message
- the report messageseverity
- the message severityarguments
- the arguments for the message- Since:
- 1.14
-
AbstractReport
public AbstractReport(java.lang.Throwable exception, java.lang.String message)
Constructor. Sets the severity toIStatus.ERROR
.- Parameters:
exception
- the exception this report is based onmessage
- the report message
-
AbstractReport
public AbstractReport(java.lang.Throwable exception, java.lang.String message, java.lang.Object... arguments)
Constructor with MessageFormat support.- Parameters:
exception
- the exception this report is based onmessage
- the report messagearguments
- the arguments for the message- Since:
- 1.14
-
AbstractReport
public AbstractReport(java.lang.Throwable exception, int severity)
Constructor.- Parameters:
exception
- the exception this report is based onseverity
- the severity of the report
-
-
Method Detail
-
getMessage
public java.lang.String getMessage()
Returns the report message.- Returns:
- the report message
-
hasException
public boolean hasException()
Whether this report is based upon an exception.- Returns:
true
, if this report is based upon an exception,false
otherwise
-
getException
public java.lang.Throwable getException()
Returns the exception this report is based on, if any.- Returns:
- the exception this report is based on, if any, otherwise
null
- See Also:
hasException()
-
getSeverity
public int getSeverity()
Returns the status of this report.- Returns:
- the status of this report
-
setException
protected void setException(java.lang.Throwable exception)
Sets the exception this report is based on.- Parameters:
exception
- the exception this report is based on- See Also:
hasException()
-
setMessage
protected void setMessage(java.lang.String message)
Sets the report' message.- Parameters:
message
- the report message to set
-
-