com.github.ldeitos.validation.ConstraintSeverity Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of extendedValidation-core Show documentation
Show all versions of extendedValidation-core Show documentation
Extension for BeanValidation API Core. Content interfaces, qualifiers and constraints definitions.
This version is Java 17 and JakartaEE 10 compatible.
package com.github.ldeitos.validation;
import javax.validation.Payload;
/**
*
* @author Leandro Deitos
*
*/
public class ConstraintSeverity implements Payload {
private class ERROR extends ConstraintSeverity {};
private class ALERT extends ConstraintSeverity {};
private class INFO extends ConstraintSeverity {};
private class WARN extends ConstraintSeverity {};
private class FATAL extends ConstraintSeverity {};
public static Class extends ConstraintSeverity> error(){
return ERROR.class;
}
public static Class extends ConstraintSeverity> alert(){
return ALERT.class;
}
public static Class extends ConstraintSeverity> info(){
return INFO.class;
}
public static Class extends ConstraintSeverity> warn(){
return WARN.class;
}
public static Class extends ConstraintSeverity> fatal(){
return FATAL.class;
}
public static Class extends ConstraintSeverity> defaultValue(){
return error();
}
}