[SDC] Onboarding 1710 rebase.
[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 static java.lang.annotation.ElementType.ANNOTATION_TYPE;
4 import static java.lang.annotation.ElementType.CONSTRUCTOR;
5 import static java.lang.annotation.ElementType.FIELD;
6 import static java.lang.annotation.ElementType.METHOD;
7 import static java.lang.annotation.ElementType.PARAMETER;
8 import static java.lang.annotation.RetentionPolicy.RUNTIME;
9
10 import java.lang.annotation.Documented;
11 import java.lang.annotation.Retention;
12 import java.lang.annotation.Target;
13 import javax.validation.Constraint;
14 import javax.validation.Payload;
15
16 /**
17  * The interface Validate string.
18  */
19 @Documented
20 @Constraint(validatedBy = StringValidator.class)
21 @Target({METHOD, FIELD, ANNOTATION_TYPE, PARAMETER, CONSTRUCTOR})
22 @Retention(RUNTIME)
23 public @interface ValidateString {
24   /**
25    * The constant message.
26    */
27   String message = "";
28
29   /**
30    * Accepted values string [ ].
31    *
32    * @return the string [ ]
33    */
34   String[] acceptedValues();
35
36   String message() default "{org.openecomp.sdcrests.vendorsoftwareproducts.types.validation"
37       + ".message}";
38
39   boolean isCaseSensitive() default false;
40
41   Class<?>[] groups() default {};
42
43   Class<? extends Payload>[] payload() default {};
44 }