public class ValidationError
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ValidationError.Severity
Class to support type-safe enumeration design pattern to
represent severity levels of validation errors.
|
Modifier and Type | Field and Description |
---|---|
static ValidationError.Severity |
ERROR
The severity for recoverable validation errors.
|
static ValidationError.Severity |
FATAL
The severity for non-recoverable validation errors.
|
static ValidationError.Severity |
WARNING
The severity for warnings.
|
Constructor and Description |
---|
ValidationError(ValidationError.Severity severity,
java.lang.String message)
Creates a new validation error.
|
ValidationError(ValidationError.Severity severity,
java.lang.String message,
java.lang.Object node)
Creates a new validation error.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getMessage()
Returns the detailed error message.
|
java.lang.Object |
getNode()
Returns the JDOM node that caused the error.
|
ValidationError.Severity |
getSeverity()
Returns the severity of this error.
|
java.lang.String |
toString()
Returns a string representation of this error suitable for
debugging and diagnosis.
|
public static final ValidationError.Severity WARNING
public static final ValidationError.Severity ERROR
public static final ValidationError.Severity FATAL
public ValidationError(ValidationError.Severity severity, java.lang.String message)
severity
- the error severity.message
- the detailed error message.public ValidationError(ValidationError.Severity severity, java.lang.String message, java.lang.Object node)
severity
- the error severity.message
- the detailed error message.node
- the JDOM node that caused the error.public ValidationError.Severity getSeverity()
public java.lang.String getMessage()
public java.lang.Object getNode()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()