Summary Table

Categories Total Count
PII 0
URL 0
DNS 0
EKL 0
IP 0
PORT 0
VsID 0
CF 0
AI 0
VPD 0
PL 0
Other 0

File Content

/*
* ValidCategoryOfCare.java
* Copyright (c) 2019 Veterans Affairs.
*/
package gov.va.oneconsult.seoc.api.validation;

import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import javax.validation.Constraint;
import javax.validation.Payload;
import org.springframework.stereotype.Component;

/**
* Custom defined Annotation to check if the category of care value has been discontinued.
* @author AbleVets
*/
@Retention(RUNTIME)
@Target({ ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER })
@Constraint(validatedBy = CategoryOfCareValidator.class)
@Documented
@Component
public @interface ValidCategoryOfCare
{

/**
* Description: Error message to be displayed when the validation fails
* @return - Returns the error message
*/
String message() default "Category of Care value has been discontinued.";

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

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