public class Validation extends Object
Constructor and Description |
---|
Validation() |
Modifier and Type | Method and Description |
---|---|
boolean |
continueValidation(ValidationException e)
Returns
true if the validation should be continued after a
exception has occured, false otherwise. |
ValidationException[] |
getExceptions()
Returns all recorded exceptions of this validation process.
|
ValidationException[] |
getExceptions(Object source)
Returns all
ValidationException s of the validated source object. |
ValidationException[] |
getExceptionsFrom(Severity minSeverity)
Returns all exceptions with a minimum severity of this validation
process.
|
ValidationException[] |
getExceptionsFrom(Severity minSeverity,
Object source)
Returns all exceptions of the source object with a minimum severity of
this validation process.
|
ValidationException[] |
getExceptionsOf(Severity severity)
Returns all exceptions with a specific severity of this validation
process.
|
ValidationException[] |
getExceptionsOf(Severity severity,
Object source)
Returns all exceptions of the source object with a specific severity of
this validation process.
|
ValidationException[] |
getExceptiosFrom(Severity minSeverity)
Deprecated.
typo, use
getExceptionsFrom(Severity) |
boolean |
hasError()
Returns
true if at least one of the recorded exceptions is
an error. |
boolean |
hasError(Object source)
Returns
true if at least one of the recorded exceptions of
the validated source object is an error. |
void |
record(ValidationException e)
Stores a validation exception.
|
public void record(ValidationException e)
e
- the occured exceptionpublic boolean continueValidation(ValidationException e)
true
if the validation should be continued after a
exception has occured, false
otherwise.e
- the occured exceptionpublic ValidationException[] getExceptions()
public ValidationException[] getExceptions(Object source)
ValidationException
s of the validated source object.source
- the validated objectValidationException
s resulted from source, or an
empty array if no exceptions existpublic ValidationException[] getExceptionsOf(Severity severity)
severity
- public ValidationException[] getExceptionsOf(Severity severity, Object source)
source
- the validated objectseverity
- @Deprecated public ValidationException[] getExceptiosFrom(Severity minSeverity)
getExceptionsFrom(Severity)
public ValidationException[] getExceptionsFrom(Severity minSeverity)
minSeverity
- public ValidationException[] getExceptionsFrom(Severity minSeverity, Object source)
source
- the validated objectminSeverity
- public boolean hasError()
true
if at least one of the recorded exceptions is
an error.ValidationException.getSeverity()
public boolean hasError(Object source)
true
if at least one of the recorded exceptions of
the validated source object is an error.source
- the validated objectValidationException.getSeverity()
Copyright © 2003–2021 XDEV Software. All rights reserved.