public class ValidationEventImpl extends java.lang.Object implements ValidationEvent
Default implementation of a ValidationEvent
.
ERROR, FATAL_ERROR, WARNING
Constructor and Description |
---|
ValidationEventImpl(int pSeverity,
java.lang.String pMessage,
ValidationEventLocator pLocator)
Creates a new instance of
ValidationEventImpl . |
ValidationEventImpl(int pSeverity,
java.lang.String pMessage,
ValidationEventLocator pLocator,
java.lang.Throwable pLinkedException)
Creates a new instance of
ValidationEventImpl . |
Modifier and Type | Method and Description |
---|---|
java.lang.Throwable |
getLinkedException()
Returns a
Throwable related to the event. |
ValidationEventLocator |
getLocator()
Returns a description of the location, where the event
occurred.
|
java.lang.String |
getMessage()
Returns a textual description of the event.
|
int |
getSeverity()
Returns the events severity: Either of
ValidationEvent.WARNING , ValidationEvent.ERROR , or ValidationEvent.FATAL_ERROR . |
void |
setLinkedException(java.lang.Throwable pLinkedException)
Sets the exception, which is linked to the event.
|
void |
setLocator(ValidationEventLocator pLocator)
Sets the events locator.
|
void |
setMessage(java.lang.String pMessage)
Sets the events message.
|
void |
setSeverity(int pSeverity)
Sets the events severity.
|
public ValidationEventImpl(int pSeverity, java.lang.String pMessage, ValidationEventLocator pLocator)
Creates a new instance of ValidationEventImpl
.
public ValidationEventImpl(int pSeverity, java.lang.String pMessage, ValidationEventLocator pLocator, java.lang.Throwable pLinkedException)
Creates a new instance of ValidationEventImpl
.
public int getSeverity()
ValidationEvent
Returns the events severity: Either of
ValidationEvent.WARNING
, ValidationEvent.ERROR
, or ValidationEvent.FATAL_ERROR
.
getSeverity
in interface ValidationEvent
public void setSeverity(int pSeverity)
Sets the events severity.
pSeverity
- The events severity, either of
ValidationEvent.WARNING
,
ValidationEvent.ERROR
, or
ValidationEvent.FATAL_ERROR
.public java.lang.String getMessage()
ValidationEvent
Returns a textual description of the event.
getMessage
in interface ValidationEvent
public void setMessage(java.lang.String pMessage)
Sets the events message.
public java.lang.Throwable getLinkedException()
ValidationEvent
Returns a Throwable
related to the event. In most cases
an exception causing the event.
getLinkedException
in interface ValidationEvent
public void setLinkedException(java.lang.Throwable pLinkedException)
Sets the exception, which is linked to the event.
public ValidationEventLocator getLocator()
ValidationEvent
Returns a description of the location, where the event occurred.
getLocator
in interface ValidationEvent
public void setLocator(ValidationEventLocator pLocator)
Sets the events locator.