Class InputValidator
java.lang.Object
fr.metabocloud.core.implementation.utils.InputValidator
Utility class with methods to validate input sent in a request.
validateExactlyOneInputSent(java.util.List<?>)- Validate that only one input type has been sent
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidvalidateExactlyOneInputSent(List<?> inputList) Validate whether only one input type has been sent in the multipart form from the request body.
-
Constructor Details
-
InputValidator
protected InputValidator()Protected constructor
-
-
Method Details
-
validateExactlyOneInputSent
Validate whether only one input type has been sent in the multipart form from the request body.- Parameters:
inputList- The multipart form as a list (only one value in this list must not be null).- Throws:
RequestBodyException- if more than one input type has been sent.
-