- java.lang.Object
-
- io.rxmicro.validation.base.AbstractListConstraintValidator
-
- All Implemented Interfaces:
ConstraintValidator<List<?>>
- Direct Known Subclasses:
SizeConstraintValidator,UniqueItemsConstraintValidator
public abstract class AbstractListConstraintValidator extends Object implements ConstraintValidator<List<?>>
- Author:
- nedis
-
-
Constructor Summary
Constructors Constructor Description AbstractListConstraintValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidvalidateList(List<List<?>> models)Validates a root model list.voidvalidateList(List<List<?>> list, io.rxmicro.rest.model.HttpModelType httpModelType, String modelName)Validates a value list.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.rxmicro.validation.ConstraintValidator
validate, validate
-
-
-
-
Method Detail
-
validateList
public void validateList(List<List<?>> list, io.rxmicro.rest.model.HttpModelType httpModelType, String modelName) throws io.rxmicro.http.error.ValidationException
Description copied from interface:ConstraintValidatorValidates a value list. The state oflistmust not be altered.- Specified by:
validateListin interfaceConstraintValidator<List<?>>- Parameters:
list- list to validatehttpModelType- http model typemodelName- parameter or header name- Throws:
io.rxmicro.http.error.ValidationException- if value does not pass the constraint
-
validateList
public void validateList(List<List<?>> models) throws io.rxmicro.http.error.ValidationException
Description copied from interface:ConstraintValidatorValidates a root model list. The state ofvaluemust not be altered.- Specified by:
validateListin interfaceConstraintValidator<List<?>>- Parameters:
models- object list to validate- Throws:
io.rxmicro.http.error.ValidationException- if value does not pass the constraint
-
-