Class FederationGatewayDownloadService
- java.lang.Object
-
- app.coronawarn.server.services.download.FederationGatewayDownloadService
-
@Component public class FederationGatewayDownloadService extends Object
Responsible for downloading and storing batch information from the federation gateway.
-
-
Field Summary
Fields Modifier and Type Field Description static String
EMPTY_HEADER
static String
HEADER_BATCH_TAG
static String
HEADER_NEXT_BATCH_TAG
-
Constructor Summary
Constructors Constructor Description FederationGatewayDownloadService(FederationGatewayClient federationGatewayClient)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BatchDownloadResponse
downloadBatch(String batchTag, LocalDate date)
Download the batch from the EFGS with the given batchTag for the given date.BatchDownloadResponse
downloadBatch(LocalDate date)
Download the first batch from the EFGS for the given date.
-
-
-
Field Detail
-
HEADER_BATCH_TAG
public static final String HEADER_BATCH_TAG
- See Also:
- Constant Field Values
-
HEADER_NEXT_BATCH_TAG
public static final String HEADER_NEXT_BATCH_TAG
- See Also:
- Constant Field Values
-
EMPTY_HEADER
public static final String EMPTY_HEADER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FederationGatewayDownloadService
public FederationGatewayDownloadService(FederationGatewayClient federationGatewayClient)
Constructor.- Parameters:
federationGatewayClient
- AFederationGatewayClient
for retrieving federation diagnosis key batches.
-
-
Method Detail
-
downloadBatch
public BatchDownloadResponse downloadBatch(LocalDate date)
Download the first batch from the EFGS for the given date.- Parameters:
date
- The date for which the batch should be downloaded.- Returns:
- The
BatchDownloadResponse
containing the downloaded batch, batchTag and nextBatchTag.
-
downloadBatch
public BatchDownloadResponse downloadBatch(String batchTag, LocalDate date)
Download the batch from the EFGS with the given batchTag for the given date.- Parameters:
batchTag
- The batchTag of the batch that should be downloaded.date
- The date for which the batch should be downloaded.- Returns:
- The
BatchDownloadResponse
containing the downloaded batch, batchTag and nextBatchTag.
-
-