|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ConstraintValidatorContext
Provide contextual data and operation when applying a given constraint validator
Method Summary | |
---|---|
void |
addError(java.lang.String message)
Add a new error message. |
void |
addError(java.lang.String message,
java.lang.String property)
Add a new error message to a given sub property property . |
void |
disableDefaultError()
Disable the default error message and default ConstraintViolation object generation. |
java.lang.String |
getDefaultErrorMessage()
|
Method Detail |
---|
void disableDefaultError()
addError(String)
,
addError(String, String)
java.lang.String getDefaultErrorMessage()
void addError(java.lang.String message)
isValid returns false
, a ConstraintViolation
object will be built
per error message including the default one unless disableDefaultError()
has been called.
Aside from the error message, ConstraintViolation
objects generated from such a call
contain the same contextual information (root bean, path and so on)
This method can be called multiple times. One ConstraintViolation
instance per
call is created.
- Parameters:
message
- new uninterpolated error message.
void addError(java.lang.String message, java.lang.String property)
property
. The subproperty
is relative to the path tot he bean or property hosting the constraint.
This error message will be interpolated.
If isValid
returns false
, a ConstraintViolation
object will be built
per error message including the default one unless disableDefaultError()
has been called.
Aside from the error message and the property path, ConstraintViolation
objects
generated from such a call contain the same contextual information
(root bean, leaf bean etc)
This method can be called multiple times. One ConstraintViolation
instance per
call is created.
message
- new uninterpolated error message.property
- property name the ConstraintViolation is targeting.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |