Interface PostConversionValidator<A extends Annotation,T>
- All Superinterfaces:
Policy<A>
- All Known Implementing Classes:
AbstractCustomPostConversionValidatorSupport
,AbstractPostConversionValidatorSupport
,IntegerRangeValidator
,MinIntegerValidator
Interface for form field validators used by
AnnotationValidationInterceptor
and
AnnotationValidationInterceptor2
that check a converted value.-
Method Summary
Modifier and TypeMethodDescriptionReturns message set by annotation.Returns message key set by annotation, which is used to retrieve message from Action's TextProvider if it's not empty string.Returns whether to write any error message to action errors, field errors, or action messages.boolean
Returns whether validator should not be skipped if conversion failed or was skipped.Returns type of recipient fields that can receive converted form value.boolean
Returns whether rejection by this validator should stop further validation.Returns result of checking converted form field value and message to use if failed.Methods inherited from interface name.matthewgreet.strutscommons.policy.Policy
getAnnotation, setAnnotation
-
Method Details
-
getMessageType
Required.MessageType getMessageType()Returns whether to write any error message to action errors, field errors, or action messages. -
getMessage
String getMessage()Returns message set by annotation. Used ifgetMessageKey()
is empty string or it fails to find a message. -
getMessageKey
String getMessageKey()Returns message key set by annotation, which is used to retrieve message from Action's TextProvider if it's not empty string. -
getRecipientClass
Returns type of recipient fields that can receive converted form value. -
getShortCircuit
boolean getShortCircuit()Returns whether rejection by this validator should stop further validation. -
getProcessNoValue
boolean getProcessNoValue()Returns whether validator should not be skipped if conversion failed or was skipped. -
validate
Returns result of checking converted form field value and message to use if failed. This is not called if the form value is empty string or null or the conversion failed.- Throws:
Exception
-