Skip to content

Commit 128e116

Browse files
slaurenzf11h
andauthored
Feat/download data (#14)
* Added functionality for value sets * Added local storage functionality for business rules * Updated Value Set handling and api description * Updated country list handling and api description * Updated business rule handling and api description * Added `X-VERSION` Header as optional * Added Licence Text * Added download of business rules, value set and country list using the dgc-lib * Add simple sanity check for downloaded data. * Update DGC-Lib to 1.1.1 Co-authored-by: Felix Dittrich <[email protected]>
1 parent 85f900b commit 128e116

42 files changed

Lines changed: 1948 additions & 103 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

pom.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<bcpkix.version>1.68</bcpkix.version>
3939
<okhttp.version>4.9.1</okhttp.version>
4040
<shedlock.version>4.23.0</shedlock.version>
41-
<dgc.lib.version>0.5.0</dgc.lib.version>
41+
<dgc.lib.version>1.1.1</dgc.lib.version>
4242
<!-- plugins -->
4343
<plugin.checkstyle.version>3.1.2</plugin.checkstyle.version>
4444
<plugin.sonar.version>3.6.1.1688</plugin.sonar.version>
@@ -133,7 +133,11 @@
133133
</dependencyManagement>
134134

135135
<dependencies>
136-
136+
<dependency>
137+
<groupId>eu.europa.ec.dgc</groupId>
138+
<artifactId>dgc-lib</artifactId>
139+
<version>${dgc.lib.version}</version>
140+
</dependency>
137141
<dependency>
138142
<groupId>org.springframework.boot</groupId>
139143
<artifactId>spring-boot-starter</artifactId>

src/main/java/eu/europa/ec/dgc/businessrule/DgcBusinessRuleServiceApplication.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*-
22
* ---license-start
3-
* eu-digital-green-certificates / dgca-verifier-service
3+
* eu-digital-green-certificates / dgca-businessrule-service
44
* ---
55
* Copyright (C) 2021 T-Systems International GmbH and all other contributors
66
* ---

src/main/java/eu/europa/ec/dgc/businessrule/config/DgcConfigProperties.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*-
22
* ---license-start
3-
* eu-digital-green-certificates / dgca-verifier-service
3+
* eu-digital-green-certificates / dgca-businessrule-service
44
* ---
55
* Copyright (C) 2021 T-Systems International GmbH and all other contributors
66
* ---
@@ -29,12 +29,18 @@
2929
@ConfigurationProperties("dgc")
3030
public class DgcConfigProperties {
3131

32-
private final CertificatesDownloader certificatesDownloader = new CertificatesDownloader();
32+
private final GatewayDownload businessRulesDownload = new GatewayDownload();
33+
34+
private final GatewayDownload valueSetsDownload = new GatewayDownload();
35+
36+
private final GatewayDownload countryListDownload = new GatewayDownload();
3337

3438
@Getter
3539
@Setter
36-
public static class CertificatesDownloader {
40+
public static class GatewayDownload {
3741
private Integer timeInterval;
3842
private Integer lockLimit;
3943
}
44+
45+
4046
}

src/main/java/eu/europa/ec/dgc/businessrule/config/ErrorHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*-
22
* ---license-start
3-
* eu-digital-green-certificates / dgca-verifier-service
3+
* eu-digital-green-certificates / dgca-businessrule-service
44
* ---
55
* Copyright (C) 2021 T-Systems International GmbH and all other contributors
66
* ---

src/main/java/eu/europa/ec/dgc/businessrule/config/OpenApiConfig.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
/*-
2+
* ---license-start
3+
* eu-digital-green-certificates / dgca-businessrule-service
4+
* ---
5+
* Copyright (C) 2021 T-Systems International GmbH and all other contributors
6+
* ---
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* ---license-end
19+
*/
20+
121
package eu.europa.ec.dgc.businessrule.config;
222

323
import io.swagger.v3.oas.models.OpenAPI;

src/main/java/eu/europa/ec/dgc/businessrule/config/SchedulerConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*-
22
* ---license-start
3-
* eu-digital-green-certificates / dgca-verifier-service
3+
* eu-digital-green-certificates / dgca-businessrule-service
44
* ---
55
* Copyright (C) 2021 T-Systems International GmbH and all other contributors
66
* ---

src/main/java/eu/europa/ec/dgc/businessrule/config/ShedLockConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*-
22
* ---license-start
3-
* eu-digital-green-certificates / dgca-verifier-service
3+
* eu-digital-green-certificates / dgca-businessrule-service
44
* ---
55
* Copyright (C) 2021 T-Systems International GmbH and all other contributors
66
* ---

src/main/java/eu/europa/ec/dgc/businessrule/entity/BusinessRuleEntity.java

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
/*-
2+
* ---license-start
3+
* eu-digital-green-certificates / dgca-businessrule-service
4+
* ---
5+
* Copyright (C) 2021 T-Systems International GmbH and all other contributors
6+
* ---
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* ---license-end
19+
*/
20+
121
package eu.europa.ec.dgc.businessrule.entity;
222

323
import javax.persistence.Column;
@@ -31,7 +51,7 @@ public class BusinessRuleEntity {
3151
private String identifier;
3252

3353
@Column(name = "version", nullable = false)
34-
String version = "1.0.0";
54+
String version;
3555

3656
@Column(name = "country_code", nullable = false, length = 2)
3757
String country;

src/main/java/eu/europa/ec/dgc/businessrule/entity/CountryListEntity.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
/*-
2+
* ---license-start
3+
* eu-digital-green-certificates / dgca-businessrule-service
4+
* ---
5+
* Copyright (C) 2021 T-Systems International GmbH and all other contributors
6+
* ---
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* ---license-end
19+
*/
20+
121
package eu.europa.ec.dgc.businessrule.entity;
222

323
import javax.persistence.Column;

src/main/java/eu/europa/ec/dgc/businessrule/entity/ShedlockEntity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*-
22
* ---license-start
3-
* eu-digital-green-certificates / dgca-verifier-service
3+
* eu-digital-green-certificates / dgca-businessrule-service
44
* ---
55
* Copyright (C) 2021 T-Systems International GmbH and all other contributors
66
* ---

0 commit comments

Comments
 (0)