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
Nested ClassesModifier and TypeClassDescriptionstatic classConstraint validator forValidBeanIdentityonIdentityinstances.static classConstraint validator forValidBeanIdentityonStringidentity tokens. -
Optional Element Summary
Optional Elements
-
Element Details
-
value
Returns the type ofIdentityto resolve to.- Returns:
- The type of
Identityto 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:
- {}
-