Class ExistingFileFieldValidator<O>
- java.lang.Object
-
- io.ultreia.java4all.validation.impl.field.FieldValidatorSupport<O,F>
-
- io.ultreia.java4all.validation.impl.field.SkipableFieldValidatorSupport<O,File>
-
- io.ultreia.java4all.validation.impl.field.ExistingFileFieldValidator<O>
-
- All Implemented Interfaces:
FieldValidator<O,File>
public class ExistingFileFieldValidator<O> extends SkipableFieldValidatorSupport<O,File>
ExistingFileFieldValidator checks that a File field exists.- Author:
- Tony Chemit - chemit@codelutin.com
-
-
Constructor Summary
Constructors Constructor Description ExistingFileFieldValidator(String fieldName, Function<O,File> fieldFunction, String messageKey, MessageBuilder<O,? super NuitonValidationContext,? super FieldValidator<O,?>> messageBuilder, BiFunction<O,NuitonValidationContext,Boolean> skipFunction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidvalidateWhenNotSkip(O object, NuitonValidationContext validationContext, ValidationMessagesCollector messagesCollector)Method to be invoked when skip parameter was not evaluated totrue.-
Methods inherited from class io.ultreia.java4all.validation.impl.field.SkipableFieldValidatorSupport
evaluateSkipParameter, skipFunction, validate
-
Methods inherited from class io.ultreia.java4all.validation.impl.field.FieldValidatorSupport
fieldFunction, getField, getFieldName, getMessage
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.ultreia.java4all.validation.impl.field.FieldValidator
addMessage
-
-
-
-
Constructor Detail
-
ExistingFileFieldValidator
public ExistingFileFieldValidator(String fieldName, Function<O,File> fieldFunction, String messageKey, MessageBuilder<O,? super NuitonValidationContext,? super FieldValidator<O,?>> messageBuilder, BiFunction<O,NuitonValidationContext,Boolean> skipFunction)
-
-
Method Detail
-
validateWhenNotSkip
public void validateWhenNotSkip(O object, NuitonValidationContext validationContext, ValidationMessagesCollector messagesCollector)
Description copied from class:SkipableFieldValidatorSupportMethod to be invoked when skip parameter was not evaluated totrue.- Specified by:
validateWhenNotSkipin classSkipableFieldValidatorSupport<O,File>- Parameters:
object- the object to be validated.validationContext- to get access to outside worldmessagesCollector- to collect messages
-
-