Package dev.orne.beans
Annotation Type ValidIdentity
@API(status=STABLE,
since="0.4")
@Target({CONSTRUCTOR,METHOD,FIELD,PARAMETER,LOCAL_VARIABLE,TYPE_USE,ANNOTATION_TYPE})
@Retention(RUNTIME)
@Documented
@Valid
@Constraint(validatedBy={ValidIdentityValidator.class,ValidIdentityValidatorForString.class})
@ReportAsSingleViolation
public @interface ValidIdentity
Validation for valid identities.
Validates that the identity, if non null, is of the expected type or can be
resolved to an identity of the expected type. If no identity type is
specified
- Since:
- 0.4
- Version:
- 1.0, 2022-10
- Author:
- (w) Iker Hernaez
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Constraint validator forValidBeanIdentity
onIdentity
instances.static class
Constraint validator forValidBeanIdentity
onString
identity tokens. -
Optional Element Summary
-
Element Details
-
value
Returns the type ofIdentity
to resolve to.- Returns:
- The type of
Identity
to resolve to.
- Default:
- dev.orne.beans.Identity.class
-
message
String messageReturns the error message.- Returns:
- The error message.
- Default:
- "{dev.orne.beans.ValidIdentity.message}"
-
groups
Class<?>[] groupsReturns the validation groups.- Returns:
- The validation groups.
- Default:
- {}
-
payload
Class<? extends javax.validation.Payload>[] payloadReturns the validation client payload.- Returns:
- The validation client payload.
- Default:
- {}
-