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 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 interface javax.validation.ConstraintValidator<ValidSubmissionPayload,​SubmissionPayload>