public abstract class CollectingValidationExceptionHandler<R> extends AbstractValidationExceptionHandler<R>
ValidationException
s in a list.
Subclasses can then derive a overall result
from this list.Constructor and Description |
---|
CollectingValidationExceptionHandler(HapiContext context) |
Modifier and Type | Method and Description |
---|---|
void |
error(ValidationException exception)
Called on ValidationExceptions with error severity
|
List<ValidationException> |
getExceptions() |
Severity |
getMinimumSeverityToCollect() |
boolean |
hasFailed()
Returns a boolean flag indicating whether a validation was successful or not.
|
void |
info(ValidationException exception)
Called on ValidationExceptions with info severity
|
void |
setMinimumSeverityToCollect(Severity minimumSeverityToCollect)
Set the minimum severity to be added to the list of exceptions.
|
void |
warning(ValidationException exception)
Called on ValidationExceptions with warning severity
|
getValidationSubject, onExceptions, setValidationSubject
getHapiContext, setHapiContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
result
public CollectingValidationExceptionHandler(HapiContext context)
context
- Hapi contextpublic void error(ValidationException exception)
AbstractValidationExceptionHandler
error
in class AbstractValidationExceptionHandler<R>
exception
- ValidationExceptionpublic void info(ValidationException exception)
AbstractValidationExceptionHandler
info
in class AbstractValidationExceptionHandler<R>
exception
- ValidationExceptionpublic void warning(ValidationException exception)
AbstractValidationExceptionHandler
warning
in class AbstractValidationExceptionHandler<R>
exception
- ValidationExceptionpublic List<ValidationException> getExceptions()
public void setMinimumSeverityToCollect(Severity minimumSeverityToCollect)
minimumSeverityToCollect
- the minimum severity to be added to the list of exceptionspublic Severity getMinimumSeverityToCollect()
public boolean hasFailed()
ValidationExceptionHandler
ValidationExceptionHandler.result()
which may return a more complex
object.ValidationExceptionHandler.hasFailed()
Copyright © 2001–2017 University Health Network. All rights reserved.