001package media.validation;
002
003import javax.validation.Constraint;
004import javax.validation.Payload;
005import java.lang.annotation.*;
006
007/**
008 * Lo stream deve rappresentare un'immagine
009 * @see ImageValidator
010 */
011@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER,
012        ElementType.ANNOTATION_TYPE})
013@Retention(RetentionPolicy.RUNTIME)
014@Constraint(validatedBy = ImageValidator.class)
015@Documented
016public @interface Image {
017    String message() default "Must be an image";
018
019    Class<?>[] groups() default {};
020
021    Class<? extends Payload>[] payload() default {};
022}