Class ValidSubmissionPayload.SubmissionPayloadValidator

    • Constructor Detail

      • SubmissionPayloadValidator

        public SubmissionPayloadValidator​(SubmissionServiceConfig submissionServiceConfig)
    • Method Detail

      • isValid

        public boolean isValid​(SubmissionPayload submissionPayload,
                               javax.validation.ConstraintValidatorContext validatorContext)
        Validates the following constraints.
        • StartIntervalNumber values from the same SubmissionPayload shall be unique.
        • There must not be more than allowed maximum number of keys in a payload (see application.yaml/max-number-of-keys)
        • The origin country can be missing or the provided value must be of the supported countries (see application.yaml).
        • The visited countries can be missing or the provided values must be part of the supported countries.
        • Either a value of accepted Transmission Risk Level or an accepted Days Since Onset Of Symptoms must be present. If one value is missing, the other one can be derived (see DiagnosisKeyNormalizer
        Specified by:
        isValid in interface javax.validation.ConstraintValidator<ValidSubmissionPayload,​SubmissionPayload>