Annotation Type NonEmptySingleFileIf
-
@Deprecated @Documented @Target(TYPE) @Retention(RUNTIME) @Constraint(validatedBy=NonEmptySingleFileIfValidator.class) @Repeatable(List.class) public @interface NonEmptySingleFileIf
Deprecated.Use aGroupSequenceProvider
instead.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, theNonEmptySingleFileIf
constraint is enforced on thefield()
. Otherwise, no constraint is enforced.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description String[]
dependants
Deprecated.String
field
Deprecated.
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description NonEmptySingleFile
constraint
Deprecated.Class<?>[]
groups
Deprecated.String
message
Deprecated.Class<? extends javax.validation.Payload>[]
payload
Deprecated.Class<?>
target
Deprecated.String
test
Deprecated.
-
-
-
Element Detail
-
dependants
String[] dependants
Deprecated.- 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
Deprecated.- Returns:
- Field on which the
constraint()
is applied when the condition is satisfied.
-
-
-
constraint
NonEmptySingleFile constraint
Deprecated.- Returns:
- Details for the
NonEmptySingleFile
constraint to check if the condition is satisfied.
- Default:
- @de.xima.fc.workflow.validation.constraints.NonEmptySingleFile
-
-
-
groups
Class<?>[] groups
Deprecated.- 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
Deprecated.- Returns:
- The default key for creating error messages in case the constraint is violated.
- Default:
- "{de.xima.fc.workflow.validation.constraints.NonEmptySingleFile.message}"
-
-
-
payload
Class<? extends javax.validation.Payload>[] payload
Deprecated.- 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
Deprecated.- Returns:
- The target class with the test method specified by
test()
. When setObject
.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
Deprecated.- Returns:
- Name of the test method to invoke when checking whether the
constraint()
needs to be enforced. This must be a static method of thetarget()
, taking the parameters in the same order as declared bydependants()
. Defaults totest
when empty.CapitalizedFieldName
- Default:
- ""
-
-