1
|
package eu.etaxonomy.cdm.validation.annotation;
|
2
|
|
3
|
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
|
4
|
import static java.lang.annotation.ElementType.FIELD;
|
5
|
import static java.lang.annotation.ElementType.METHOD;
|
6
|
import static java.lang.annotation.ElementType.TYPE;
|
7
|
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
8
|
|
9
|
import java.lang.annotation.Documented;
|
10
|
import java.lang.annotation.Retention;
|
11
|
import java.lang.annotation.Target;
|
12
|
|
13
|
import javax.validation.Constraint;
|
14
|
import javax.validation.Payload;
|
15
|
|
16
|
import eu.etaxonomy.cdm.validation.constraint.ReferenceCheckValidator;
|
17
|
|
18
|
|
19
|
@Target( { TYPE, METHOD, FIELD, ANNOTATION_TYPE})
|
20
|
@Retention(RUNTIME)
|
21
|
@Constraint(validatedBy = ReferenceCheckValidator.class)
|
22
|
@Documented
|
23
|
public @interface ReferenceCheck {
|
24
|
|
25
|
String message() default "{eu.etaxonomy.cdm.validation.annotation.InReference.ReferenceShouldNotHaveIsbn.message}";
|
26
|
|
27
|
Class<? extends Payload>[] payload() default {};
|
28
|
|
29
|
Class<?>[] groups() default {}; //Level2.class
|
30
|
}
|