javax.xml.bind.helpers

Class ValidationEventImpl

Implemented Interfaces:
ValidationEvent
Known Direct Subclasses:
NotIdentifiableEventImpl, ParseConversionEventImpl, PrintConversionEventImpl, ValidationEventImpl

public class ValidationEventImpl
extends java.lang.Object
implements ValidationEvent

Default implementation of a ValidationEvent.
Author:
JSR-31
Since:
JAXB1.0

Fields inherited from interface javax.xml.bind.ValidationEvent

ERROR, FATAL_ERROR, WARNING

Constructor Summary

ValidationEventImpl(int pSeverity, String pMessage, ValidationEventLocator pLocator)
Creates a new instance of ValidationEventImpl.
ValidationEventImpl(int pSeverity, String pMessage, ValidationEventLocator pLocator, Throwable pLinkedException)
Creates a new instance of ValidationEventImpl.

Method Summary

Throwable
getLinkedException()
Returns a Throwable related to the event.
ValidationEventLocator
getLocator()
Returns a description of the location, where the event occurred.
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(Throwable pLinkedException)
Sets the exception, which is linked to the event.
void
setLocator(ValidationEventLocator pLocator)
Sets the events locator.
void
setMessage(String pMessage)
Sets the events message.
void
setSeverity(int pSeverity)
Sets the events severity.

Constructor Details

ValidationEventImpl

public ValidationEventImpl(int pSeverity,
                           String pMessage,
                           ValidationEventLocator pLocator)
Creates a new instance of ValidationEventImpl.

ValidationEventImpl

public ValidationEventImpl(int pSeverity,
                           String pMessage,
                           ValidationEventLocator pLocator,
                           Throwable pLinkedException)
Creates a new instance of ValidationEventImpl.

Method Details

getLinkedException

public Throwable getLinkedException()
Returns a Throwable related to the event. In most cases an exception causing the event.
Specified by:
getLinkedException in interface ValidationEvent

getLocator

public ValidationEventLocator getLocator()
Returns a description of the location, where the event occurred.
Specified by:
getLocator in interface ValidationEvent

getMessage

public String getMessage()
Returns a textual description of the event.
Specified by:
getMessage in interface ValidationEvent

getSeverity

public int getSeverity()
Specified by:
getSeverity in interface ValidationEvent
Returns:
Returns the events severity.

setLinkedException

public void setLinkedException(Throwable pLinkedException)
Sets the exception, which is linked to the event.

setLocator

public void setLocator(ValidationEventLocator pLocator)
Sets the events locator.

setMessage

public void setMessage(String pMessage)
Sets the events message.

setSeverity

public void setSeverity(int pSeverity)
Sets the events severity.