Class 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 Detail

      • MIN_MAXIMUM_REQUEST_SIZE

        public static final org.springframework.util.unit.DataSize MIN_MAXIMUM_REQUEST_SIZE
      • MAX_MAXIMUM_REQUEST_SIZE

        public static final org.springframework.util.unit.DataSize MAX_MAXIMUM_REQUEST_SIZE
    • Constructor Detail

      • SubmissionServiceConfigValidator

        public SubmissionServiceConfigValidator()
    • Method Detail

      • supports

        public boolean supports​(Class<?> type)
        Specified by:
        supports in interface org.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 interface org.springframework.validation.Validator