Class SubmissionController


  • @RestController
    @RequestMapping("/version/v1")
    @Validated
    public class SubmissionController
    extends Object
    • Field Detail

      • SUBMISSION_ROUTE

        public static final String SUBMISSION_ROUTE
        The route to the submission endpoint (version agnostic).
        See Also:
        Constant Field Values
    • Method Detail

      • submitDiagnosisKey

        @PostMapping("/diagnosis-keys")
        public org.springframework.web.context.request.async.DeferredResult<org.springframework.http.ResponseEntity<Void>> submitDiagnosisKey​(@ValidSubmissionPayload @RequestBody
                                                                                                                                              SubmissionPayload exposureKeys,
                                                                                                                                              @RequestHeader("cwa-fake")
                                                                                                                                              Integer fake,
                                                                                                                                              @RequestHeader("cwa-authorization")
                                                                                                                                              String tan)
        Handles diagnosis key submission requests.
        Parameters:
        exposureKeys - The unmarshalled protocol buffers submission payload.
        fake - A header flag, marking fake requests.
        tan - A tan for diagnosis verification.
        Returns:
        An empty response body.
      • persistDiagnosisKeysPayload

        public void persistDiagnosisKeysPayload​(SubmissionPayload protoBufDiagnosisKeys)
        Persists the diagnosis keys contained in the specified request payload.
        Parameters:
        protoBufDiagnosisKeys - Diagnosis keys that were specified in the request.
        Throws:
        IllegalArgumentException - in case the given collection contains null.
      • getFakeDelay

        public Double getFakeDelay()
        Gets the current fake delay. Used for monitoring.
        Returns:
        the current fake delay