javax.xml.bind.helpers
Class ValidationEventImpl

java.lang.Object
  extended by javax.xml.bind.helpers.ValidationEventImpl
All Implemented Interfaces:
ValidationEvent
Direct Known Subclasses:
NotIdentifiableEventImpl, ParseConversionEventImpl, PrintConversionEventImpl, ValidationEventImpl

public class ValidationEventImpl
extends java.lang.Object
implements ValidationEvent

Default implementation of a ValidationEvent.

Since:
JAXB1.0
Author:
JSR-31

Field Summary
 
Fields inherited from interface javax.xml.bind.ValidationEvent
ERROR, FATAL_ERROR, WARNING
 
Constructor Summary
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.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidationEventImpl

public ValidationEventImpl(int pSeverity,
                           java.lang.String pMessage,
                           ValidationEventLocator pLocator)

Creates a new instance of ValidationEventImpl.


ValidationEventImpl

public ValidationEventImpl(int pSeverity,
                           java.lang.String pMessage,
                           ValidationEventLocator pLocator,
                           java.lang.Throwable pLinkedException)

Creates a new instance of ValidationEventImpl.

Method Detail

getSeverity

public int getSeverity()
Description copied from interface: ValidationEvent

Returns the events severity: Either of ValidationEvent.WARNING, ValidationEvent.ERROR, or ValidationEvent.FATAL_ERROR.

Specified by:
getSeverity in interface ValidationEvent
Returns:
Returns the events severity.

setSeverity

public void setSeverity(int pSeverity)

Sets the events severity.

Parameters:
pSeverity - The events severity, either of ValidationEvent.WARNING, ValidationEvent.ERROR, or ValidationEvent.FATAL_ERROR.


getMessage

public java.lang.String getMessage()
Description copied from interface: ValidationEvent

Returns a textual description of the event.

Specified by:
getMessage in interface ValidationEvent

setMessage

public void setMessage(java.lang.String pMessage)

Sets the events message.


getLinkedException

public java.lang.Throwable getLinkedException()
Description copied from interface: ValidationEvent

Returns a Throwable related to the event. In most cases an exception causing the event.

Specified by:
getLinkedException in interface ValidationEvent

setLinkedException

public void setLinkedException(java.lang.Throwable pLinkedException)

Sets the exception, which is linked to the event.


getLocator

public ValidationEventLocator getLocator()
Description copied from interface: ValidationEvent

Returns a description of the location, where the event occurred.

Specified by:
getLocator in interface ValidationEvent

setLocator

public void setLocator(ValidationEventLocator pLocator)

Sets the events locator.