Class AbstractCustomListPostConversionValidatorSupport<T>
java.lang.Object
name.matthewgreet.strutscommons.policy.AbstractPolicySupport<CustomListPostConversionValidation>
name.matthewgreet.strutscommons.policy.AbstractListPostConversionValidatorSupport<CustomListPostConversionValidation,T>
name.matthewgreet.strutscommons.policy.AbstractCustomListPostConversionValidatorSupport<T>
- All Implemented Interfaces:
ListPostConversionValidator<CustomListPostConversionValidation,,T> Policy<CustomListPostConversionValidation>
public abstract class AbstractCustomListPostConversionValidatorSupport<T>
extends AbstractListPostConversionValidatorSupport<CustomListPostConversionValidation,T>
Template class for custom list validators that validates a converted array or collection form field. Despite the
name, recipient form fields can be non-list collections and arrays. This is useful for validating the list as a
whole, such as non-empty list, and are run after individual entry post-conversion validators. Subclasses must
implement
ListPostConversionValidator.getRecipientClass() and #validate.-
Constructor Summary
Constructors -
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.booleanReturns whether validator should not be skipped if conversion was skipped.booleanReturns whether rejection by this validator should stop further validation.abstract ValidationResultvalidate(Collection<T> formValue) Returns result of checking converted form field value and message to use if failed.Methods inherited from class name.matthewgreet.strutscommons.policy.AbstractPolicySupport
getAnnotation, setAnnotationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface name.matthewgreet.strutscommons.policy.ListPostConversionValidator
getRecipientClassMethods inherited from interface name.matthewgreet.strutscommons.policy.Policy
getAnnotation, setAnnotation
-
Constructor Details
-
AbstractCustomListPostConversionValidatorSupport
public AbstractCustomListPostConversionValidatorSupport()
-
-
Method Details
-
getMessageType
Description copied from interface:ListPostConversionValidatorReturns whether to write any error message to action errors, field errors, or action messages. -
getMessage
Description copied from interface:ListPostConversionValidatorReturns message set by annotation. Used ifListPostConversionValidator.getMessageKey()is empty string or it fails to find a message. -
getMessageKey
Description copied from interface:ListPostConversionValidatorReturns message key set by annotation, which is used to retrieve message from Action's TextProvider if it's not empty string. -
getShortCircuit
public boolean getShortCircuit()Description copied from interface:ListPostConversionValidatorReturns whether rejection by this validator should stop further validation. -
getProcessNoValue
public boolean getProcessNoValue()Description copied from interface:ListPostConversionValidatorReturns whether validator should not be skipped if conversion was skipped. -
validate
Description copied from interface:ListPostConversionValidatorReturns 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.
-