Class AbstractConstraint
- java.lang.Object
-
- com.github.damianwajser.validator.constraint.AbstractConstraint
-
- Direct Known Subclasses:
AbstractWordConstraint,AssertTrueConstraint,Base64Constraint,CardTokenConstraint,CountryIso3166Constraint,DecimalMinConstraint,DigitsConstraint,EmailConstraint,ExpirationCardConstraint,MatchEnumConstraint,MaxConstraint,MinConstraint,NotEmptyConstraint,NotNullConstraint,PasswordConstraint,PastConstraint,PatternConstraint,SizeConstraint,UUIDConstraint
public abstract class AbstractConstraint extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected org.springframework.http.HttpMethod[]excludesprotected booleanisNulleableprotected org.springframework.http.HttpMethod[]onlyIn
-
Constructor Summary
Constructors Constructor Description AbstractConstraint()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected booleancurrentHttpMethodIsSkippeable()protected Optional<org.springframework.http.HttpMethod>getCurrentHttpMethod()protected Optional<javax.servlet.http.HttpServletRequest>getCurrentHttpRequest()protected abstract booleanhasError(Object field, javax.validation.ConstraintValidatorContext cxt)protected voidinitialize(org.springframework.http.HttpMethod[] excludes, org.springframework.http.HttpMethod[] onlyIn, boolean isNulleable)booleanisValid(Object field, javax.validation.ConstraintValidatorContext cxt)
-
-
-
Method Detail
-
initialize
protected void initialize(org.springframework.http.HttpMethod[] excludes, org.springframework.http.HttpMethod[] onlyIn, boolean isNulleable)
-
hasError
protected abstract boolean hasError(Object field, javax.validation.ConstraintValidatorContext cxt)
-
getCurrentHttpRequest
protected Optional<javax.servlet.http.HttpServletRequest> getCurrentHttpRequest()
-
getCurrentHttpMethod
protected Optional<org.springframework.http.HttpMethod> getCurrentHttpMethod()
-
currentHttpMethodIsSkippeable
protected boolean currentHttpMethodIsSkippeable()
- Returns:
- true if has exlude request method, false in Other case
-
isValid
public boolean isValid(Object field, javax.validation.ConstraintValidatorContext cxt)
-
-