Annotation Type OnlyByCreator
-
@Target({TYPE,ANNOTATION_TYPE,METHOD,FIELD}) @Retention(RUNTIME) @Constraint(validatedBy=OnlyByCreatorValidator.class) @Documented public @interface OnlyByCreator
Annotation for JSR-303 validator. It validates the requester behind an entity modification is either the creator or an administrator.
-
-
Element Detail
-
message
String message
- Default:
- "The requester of the action on the entity isn\'t the creator of that entity"
-
-
-
groups
Class<?>[] groups
- Default:
- {}
-
-
-
payload
Class<? extends javax.validation.Payload>[] payload
- Default:
- {}
-
-
-
owner
String owner
If the entity belongs to a parent, then returns the name of the field that refers the owner of the entity.- Returns:
- the field name from which the owner of the entity can be retrieved (the owner must be also an entity).
- Default:
- ""
-
-