re base code
[sdc.git] / openecomp-be / api / openecomp-sdc-rest-webapp / vendor-software-products-rest / vendor-software-products-rest-types / src / main / java / org / openecomp / sdcrests / vendorsoftwareproducts / types / validation / ValidateString.java
1 package org.openecomp.sdcrests.vendorsoftwareproducts.types.validation;
2
3 import javax.validation.Constraint;
4 import javax.validation.Payload;
5 import java.lang.annotation.Documented;
6 import java.lang.annotation.Retention;
7 import java.lang.annotation.Target;
8
9 import static java.lang.annotation.ElementType.*;
10 import static java.lang.annotation.RetentionPolicy.RUNTIME;
11
12 /**
13  * The interface Validate string.
14  */
15 @Documented
16 @Constraint(validatedBy = StringValidator.class)
17 @Target({METHOD, FIELD, ANNOTATION_TYPE, PARAMETER, CONSTRUCTOR})
18 @Retention(RUNTIME)
19 public @interface ValidateString {
20   /**
21    * The constant message.
22    */
23   String message = "";
24
25   /**
26    * Accepted values string [ ].
27    *
28    * @return the string [ ]
29    */
30   String[] acceptedValues();
31
32   String message() default "{org.openecomp.sdcrests.vendorsoftwareproducts.types.validation"
33       + ".message}";
34
35   boolean isCaseSensitive() default false;
36
37   Class<?>[] groups() default {};
38
39   Class<? extends Payload>[] payload() default {};
40 }