Add collaboration feature
[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.ANNOTATION_TYPE;
10 import static java.lang.annotation.ElementType.CONSTRUCTOR;
11 import static java.lang.annotation.ElementType.FIELD;
12 import static java.lang.annotation.ElementType.METHOD;
13 import static java.lang.annotation.ElementType.PARAMETER;
14 import static java.lang.annotation.RetentionPolicy.RUNTIME;
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 }