nl.vpro.validation.StringList Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of media-domain Show documentation
Show all versions of media-domain Show documentation
The basic domain classes for 'media', the core of POMS. Also, the 'update' XML bindings for it.
It also contains some closely related domain classes like the enum to contain NICAM kijkwijzer settings.
/*
* Copyright (C) 2011 Licensed under the Apache License, Version 2.0
* VPRO The Netherlands
*/
package nl.vpro.validation;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER})
@Retention(RUNTIME)
@Constraint(validatedBy = StringListValidator.class)
@Documented
public @interface StringList {
String message() default "Value in string list not valid";
Class>[] groups() default {};
Class extends Payload>[] payload() default {};
int maxLength() default 1024;
int minLenght() default 0;
boolean notNull() default true;
String pattern() default ".*";
/**
* Defines several {@link StringList} annotations on the same element.
*
* @see StringList
*/
@Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER})
@Retention(RUNTIME)
@Constraint(validatedBy = {})
@Documented
@interface List {
StringList[] value();
}
}