Class AbstractCustomCollectionPostConversionValidatorSupport<T>

All Implemented Interfaces:
CollectionPostConversionValidator<CustomCollectionPostConversion,T>, Policy<CustomCollectionPostConversion>, Validator<CustomCollectionPostConversion>

public abstract class AbstractCustomCollectionPostConversionValidatorSupport<T> extends AbstractCollectionPostConversionValidatorSupport<CustomCollectionPostConversion,T>
Template class for client supplied validators that validates a converted form field value that are collections. Subclasses must implement CollectionPostConversionValidator.getRecipientClass() and validate(java.util.Collection<T>).
  • Constructor Details

    • AbstractCustomCollectionPostConversionValidatorSupport

      public AbstractCustomCollectionPostConversionValidatorSupport()
  • Method Details

    • getMessageType

      public Required.MessageType getMessageType()
      Description copied from interface: Validator
      Returns whether to write any error message to action errors, field errors, or action messages.
    • getMessage

      public String getMessage()
      Description copied from interface: Validator
      Returns message set by annotation. Used if Validator.getMessageKey() is empty string or it fails to find a message.
    • getMessageKey

      public String getMessageKey()
      Description copied from interface: Validator
      Returns 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: CollectionPostConversionValidator
      Returns whether rejection by this validator should stop further validation.
    • validate

      public abstract ValidationResult validate(Collection<T> formValue)
      Description copied from interface: CollectionPostConversionValidator
      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.