org.appng.api.support.validation

## Class FileUploadValidator

- java.lang.Object
- - org.appng.api.support.validation.FileUploadValidator

- All Implemented Interfaces:
    javax.validation.ConstraintValidator<FileUpload,FormUpload>

      public class FileUploadValidator
      extends Object
      implements javax.validation.ConstraintValidator<FileUpload,FormUpload>

  Checks that a `FormUpload` matches the restrictions given by a `FileUpload`.
  Author:
    Matthias Müller

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected FileUpload` | `file`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FileUploadValidator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `initialize(FileUpload file)`
    `boolean` | `isValid(FormUpload upload, javax.validation.ConstraintValidatorContext constraintContext)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### file

          protected FileUpload file

  - ### Constructor Detail

    - #### FileUploadValidator

          public FileUploadValidator()

  - ### Method Detail

    - #### initialize

          public void initialize(FileUpload file)

      Specified by:
        `initialize` in interface `javax.validation.ConstraintValidator<FileUpload,FormUpload>`

    - #### isValid

          public boolean isValid(FormUpload upload,
                                 javax.validation.ConstraintValidatorContext constraintContext)

      Specified by:
        `isValid` in interface `javax.validation.ConstraintValidator<FileUpload,FormUpload>`

Copyright © 2011–2023 aiticon GmbH. All rights reserved.