|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.bval.jsr303.ConstraintValidationListener<T>
public final class ConstraintValidationListener<T>
Description: JSR-303 ValidationListener implementation; provides ConstraintViolations.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.bval.model.ValidationListener |
|---|
ValidationListener.Error |
| Constructor Summary | |
|---|---|
ConstraintValidationListener(T aRootBean,
Class<T> rootBeanType)
Create a new ConstraintValidationListener instance. |
|
| Method Summary | ||
|---|---|---|
|
addError(String reason,
ValidationContext<VL> context)
|
|
|
addError(ValidationListener.Error error,
ValidationContext<VL> context)
|
|
boolean |
beginReportAsSingle()
Signify the beginning of a report-as-single-violation composite validation. |
|
boolean |
endReportAsSingle()
Signify the end of a report-as-single-violation composite validation. |
|
Set<ConstraintViolation<T>> |
getConstraintViolations()
Get the ConstraintViolations accumulated by this ConstraintValidationListener. |
|
T |
getRootBean()
Get the root bean. |
|
Class<T> |
getRootBeanType()
Get the root bean type of this ConstraintValidationListener. |
|
boolean |
hasViolations()
Learn whether there are violations available. |
|
boolean |
isEmpty()
Learn whether no violations were found. |
|
int |
violationsSize()
Get the count of encountered violations. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConstraintValidationListener(T aRootBean,
Class<T> rootBeanType)
aRootBean - rootBeanType - | Method Detail |
|---|
public <VL extends ValidationListener> void addError(String reason,
ValidationContext<VL> context)
addError in interface ValidationListener
public <VL extends ValidationListener> void addError(ValidationListener.Error error,
ValidationContext<VL> context)
addError in interface ValidationListenerpublic Set<ConstraintViolation<T>> getConstraintViolations()
ConstraintViolations accumulated by this ConstraintValidationListener.
Set of ConstraintViolationpublic boolean isEmpty()
public T getRootBean()
public Class<T> getRootBeanType()
ConstraintValidationListener.
public int violationsSize()
public boolean hasViolations()
public boolean beginReportAsSingle()
true as this call caused the listener to enter report-as-single-violation modepublic boolean endReportAsSingle()
true as this call caused the listener to exit report-as-single-violation mode
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||