Class ValidSubmissionPayload.SubmissionPayloadValidator
- java.lang.Object
-
- app.coronawarn.server.services.submission.validation.ValidSubmissionPayload.SubmissionPayloadValidator
-
- All Implemented Interfaces:
javax.validation.ConstraintValidator<ValidSubmissionPayload,SubmissionPayload>
- Enclosing class:
- ValidSubmissionPayload
public static class ValidSubmissionPayload.SubmissionPayloadValidator extends Object implements javax.validation.ConstraintValidator<ValidSubmissionPayload,SubmissionPayload>
-
-
Constructor Summary
Constructors Constructor Description SubmissionPayloadValidator(SubmissionServiceConfig submissionServiceConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isValid(SubmissionPayload submissionPayload, javax.validation.ConstraintValidatorContext validatorContext)
Validates the following constraints.
-
-
-
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 be no gaps for StartIntervalNumber values for a user.
- There must not be any keys in the
SubmissionPayload
have overlapping time windows. - The period of time covered by the data file must not exceed the configured maximum number of days.
- Specified by:
isValid
in interfacejavax.validation.ConstraintValidator<ValidSubmissionPayload,SubmissionPayload>
- StartIntervalNumber values from the same
-
-