aboutsummaryrefslogtreecommitdiffstats
path: root/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
blob: 1218bb1c2214f06fa7d7297b6213513d0b83045f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package org.openecomp.sdcrests.vendorsoftwareproducts.types.validation;

import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.ElementType.CONSTRUCTOR;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import javax.validation.Constraint;
import javax.validation.Payload;

/**
 * The interface Validate string.
 */
@Documented
@Constraint(validatedBy = StringValidator.class)
@Target({METHOD, FIELD, ANNOTATION_TYPE, PARAMETER, CONSTRUCTOR})
@Retention(RUNTIME)
public @interface ValidateString {
  /**
   * The constant message.
   */
  String message = "";

  /**
   * Accepted values string [ ].
   *
   * @return the string [ ]
   */
  String[] acceptedValues();

  String message() default "{org.openecomp.sdcrests.vendorsoftwareproducts.types.validation"
      + ".message}";

  boolean isCaseSensitive() default false;

  Class<?>[] groups() default {};

  Class<? extends Payload>[] payload() default {};
}