Annotation Type MultiFileSizeIf


@Documented @Target(TYPE) @Retention(RUNTIME) @Constraint(validatedBy=MultiFileSizeIfValidator.class) @Repeatable(List.class) public @interface MultiFileSizeIf
Class-level constraint annotation that checks enforces another constraint to a field of the class only when a condition that may depend on other fields of the class is satisfied. If the condition is satisfied, the MultiFileSizeIf constraint is enforced on the field(). Otherwise, no constraint is enforced.
Since:
8.0.0
Author:
XIMA MEDIA GmbH
  • Element Details

    • constraint

      MultiFileSize constraint
      Returns:
      Details for the MultiFileSize constraint to check if the condition is satisfied.
    • dependants

      String[] dependants
      Returns:
      A list of properties upon which this conditional constraint depends. The values of these properties are passed to the test method in the order as specified here.
    • field

      String field
      Returns:
      Field on which the constraint() is applied when the condition is satisfied.
    • groups

      Class<?>[] groups
      Returns:
      Allows the specification of validation groups, to which this constraint belongs. When not specified, the constraint is placed in the Default group.
      Default:
      {}
    • message

      String message
      Returns:
      The default key for creating error messages in case the constraint is violated.
      Default:
      "{de.xima.fc.workflow.validation.constraints.MultiFileSize.message}"
    • payload

      Class<? extends javax.validation.Payload>[] payload
      Returns:
      The payload that can be used by clients of the Jakarta Bean Validation API to assign custom payload objects to a constraint.
      Default:
      {}
    • target

      Class<?> target
      Returns:
      The target class with the test method specified by test(). When set Object.class, defaults the runtime class of the instance being validated. It is generally good practice to set this target, as it enables checking whether the test method exists without having to perform a validation.
      Default:
      java.lang.Object.class
    • test

      String test
      Returns:
      Name of the test method to invoke when checking whether the constraint() needs to be enforced. This must be a static method of the target(), taking the parameters in the same order as declared by dependants(). Defaults to testCapitalizedFieldName when empty.
      Default:
      ""