Class SubmissionServiceConfigValidator
- java.lang.Object
-
- app.coronawarn.server.services.submission.config.SubmissionServiceConfigValidator
-
- All Implemented Interfaces:
org.springframework.validation.Validator
public class SubmissionServiceConfigValidator extends Object implements org.springframework.validation.Validator
Validate the values of the SubmissionServiceConfig.
-
-
Field Summary
Fields Modifier and Type Field Description static org.springframework.util.unit.DataSize
MAX_MAXIMUM_REQUEST_SIZE
static org.springframework.util.unit.DataSize
MIN_MAXIMUM_REQUEST_SIZE
-
Constructor Summary
Constructors Constructor Description SubmissionServiceConfigValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
supports(Class<?> type)
void
validate(Object o, org.springframework.validation.Errors errors)
Validates the following constraints.
-
-
-
Method Detail
-
supports
public boolean supports(Class<?> type)
- Specified by:
supports
in interfaceorg.springframework.validation.Validator
-
validate
public void validate(Object o, org.springframework.validation.Errors errors)
Validates the following constraints.- MaximumRequestSize is in the defined range.
- List of SupportedCountries contains only valid ISO Codes
- Mapping of trl (Transmission Risk Level) to dsos contains only values in allowed range
- Mapping of dsos (Days Since Onset of Symptoms) to trl contains only values in allowed range
- Specified by:
validate
in interfaceorg.springframework.validation.Validator
-
-