Class SubmissionController
- java.lang.Object
-
- app.coronawarn.server.services.submission.controller.SubmissionController
-
@RestController @RequestMapping("/version/v1") @Validated public class SubmissionController extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
SUBMISSION_ROUTE
The route to the submission endpoint (version agnostic).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
persistDiagnosisKeysPayload(SubmissionPayload protoBufDiagnosisKeys)
Persists the diagnosis keys contained in the specified request payload.org.springframework.web.context.request.async.DeferredResult<org.springframework.http.ResponseEntity<Void>>
submitDiagnosisKey(SubmissionPayload exposureKeys, String tan)
Handles diagnosis key submission requests.
-
-
-
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(value="/diagnosis-keys", headers="cwa-fake=0") public org.springframework.web.context.request.async.DeferredResult<org.springframework.http.ResponseEntity<Void>> submitDiagnosisKey(@ValidSubmissionPayload @RequestBody SubmissionPayload exposureKeys, @RequestHeader("cwa-authorization") String tan)
Handles diagnosis key submission requests.- Parameters:
exposureKeys
- The unmarshalled protocol buffers submission payload.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.
-
-