Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merging dev into uat #181

Merged
merged 167 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
167 commits
Select commit Hold shift + click to select a range
931a866
set max-size connection jdbc
adrrss May 30, 2024
158443d
fix: 931a86616922160fe2bff349d0dfe8486ee1f8bc
actions-user May 30, 2024
75b96df
pom.xml updated with new version 1.15.0-dev.2
actions-user May 30, 2024
7809bca
Chart.yaml updated with new version v1.15.0-dev.2
actions-user May 30, 2024
766e0b1
fix: docker-image: v1.15.0-dev.2, chart: v1.15.0-dev.2
actions-user May 30, 2024
1f14b57
Merge branch 'uat' into dev
adrrss May 30, 2024
d473b72
Merge branch 'uat' into dev
SMANUM May 31, 2024
f325482
modifying error messages
LuciaM1 Jun 4, 2024
5ed9fe9
feat: f3254820fb01b5eca6105ea828609f300ebf153f
actions-user Jun 4, 2024
9e683e9
pom.xml updated with new version 1.17.0-dev.1
actions-user Jun 4, 2024
42248ec
Chart.yaml updated with new version v1.17.0-dev.1
actions-user Jun 4, 2024
22acb09
feat: docker-image: v1.17.0-dev.1, chart: v1.17.0-dev.1
actions-user Jun 4, 2024
40bc2b6
feat: f3254820fb01b5eca6105ea828609f300ebf153f
actions-user Jun 4, 2024
4d85bcb
pom.xml updated with new version 1.17.0-dev.2
actions-user Jun 4, 2024
219c64f
Chart.yaml updated with new version v1.17.0-dev.2
actions-user Jun 4, 2024
ca2653d
feat: 219c64f9da812254a68fe4dd78cd32a6d067ed47
actions-user Jun 4, 2024
3e800a3
pom.xml updated with new version 1.17.0-dev.2
actions-user Jun 4, 2024
fbf2b9c
Chart.yaml updated with new version v1.17.0-dev.2
actions-user Jun 4, 2024
170e9d0
feat: docker-image: v1.17.0-dev.2, chart: v1.17.0-dev.2
actions-user Jun 4, 2024
13b8af2
Merge remote-tracking branch 'origin/uat' into dev
LuciaM1 Jun 4, 2024
62b2ef2
set max-size connection jdbc
adrrss Jun 4, 2024
2a14d98
Merge branch 'uat' into dev
GiacomoBrancazi Jun 4, 2024
5366470
feat: 2a14d9887bb99124afdaa897c7e18ebcb030f7be
actions-user Jun 4, 2024
65f1b26
pom.xml updated with new version 1.18.0-dev.1
actions-user Jun 4, 2024
0c233d6
Chart.yaml updated with new version v1.18.0-dev.1
actions-user Jun 4, 2024
06e9cfc
feat: docker-image: v1.18.0-dev.1, chart: v1.18.0-dev.1
actions-user Jun 4, 2024
751f1b0
feat: 06e9cfc07c9ac9dc5d936d79ed26bd18546c665d
actions-user Jun 4, 2024
5c5a9c8
pom.xml updated with new version 1.18.0-dev.2
actions-user Jun 4, 2024
5f0beb0
Chart.yaml updated with new version v1.18.0-dev.2
actions-user Jun 4, 2024
1df9d07
feat: docker-image: v1.18.0-dev.2, chart: v1.18.0-dev.2
actions-user Jun 4, 2024
3a56479
feat: 1df9d077d0a13fcda0decaa5eec81313e03be929
actions-user Jun 4, 2024
3708a62
pom.xml updated with new version 1.18.0-dev.3
actions-user Jun 4, 2024
85548d1
Chart.yaml updated with new version v1.18.0-dev.3
actions-user Jun 4, 2024
bed30cf
feat: docker-image: v1.18.0-dev.3, chart: v1.18.0-dev.3
actions-user Jun 4, 2024
f5461bf
feat: bed30cfdffe64e1c35a08f51c5e2e38f33b20527
actions-user Jun 4, 2024
1dbf9c8
pom.xml updated with new version 1.18.0-dev.4
actions-user Jun 4, 2024
565efe7
Chart.yaml updated with new version v1.18.0-dev.4
actions-user Jun 4, 2024
907307d
feat: docker-image: v1.18.0-dev.4, chart: v1.18.0-dev.4
actions-user Jun 4, 2024
a885cda
changing autoscaling value
SMANUM Jun 5, 2024
48a6198
adding new ECS jaeger url
LuciaM1 Jun 21, 2024
dd60572
feat: 48a6198a471231517957937b844a0479c0993a89
actions-user Jun 21, 2024
93f2803
pom.xml updated with new version 1.18.0-dev.5
actions-user Jun 21, 2024
f2afa39
Chart.yaml updated with new version v1.18.0-dev.5
actions-user Jun 21, 2024
f7fdefc
feat: docker-image: v1.18.0-dev.5, chart: v1.18.0-dev.5
actions-user Jun 21, 2024
f08f2a4
Merge branch 'uat' into dev
LuciaM1 Jun 21, 2024
9088b5a
fixing error message
LuciaM1 Jul 1, 2024
86314c4
fixing error message
LuciaM1 Jul 1, 2024
4a2fd03
fixing error message
LuciaM1 Jul 1, 2024
accdacf
Fix/openapi (#172)
LuciaM1 Jul 16, 2024
abe651a
feat: accdacfbe15088217c8595635ecbf7d0baf1f97b
actions-user Jul 16, 2024
41f43ce
pom.xml updated with new version 1.19.0-dev.1
actions-user Jul 16, 2024
2755a78
Chart.yaml updated with new version v1.19.0-dev.1
actions-user Jul 16, 2024
73b7f3a
feat: docker-image: v1.19.0-dev.1, chart: v1.19.0-dev.1
actions-user Jul 16, 2024
3023ca8
fixing openapi
LuciaM1 Jul 17, 2024
2a17b07
added info-contact
ElisKina-dev Jul 17, 2024
070688c
feat: 2a17b07ebdd4212ac1d8ce829dedfe68bdca12fa
actions-user Jul 17, 2024
91c2937
pom.xml updated with new version 1.19.0-dev.2
actions-user Jul 17, 2024
45d368b
Chart.yaml updated with new version v1.19.0-dev.2
actions-user Jul 17, 2024
822f596
feat: docker-image: v1.19.0-dev.2, chart: v1.19.0-dev.2
actions-user Jul 17, 2024
54fa31b
User profile replica (#173)
ElisKina-dev Jul 18, 2024
a113e63
fixing first access
LuciaM1 Jul 18, 2024
c5cf6eb
feat: a113e6306841f8b1c6138a3d0f8c0fbd0d8b45f0
actions-user Jul 18, 2024
e411a4e
pom.xml updated with new version 1.19.0-dev.3
actions-user Jul 18, 2024
4bb9a06
Chart.yaml updated with new version v1.19.0-dev.3
actions-user Jul 18, 2024
ae96902
feat: docker-image: v1.19.0-dev.3, chart: v1.19.0-dev.3
actions-user Jul 18, 2024
e9717a1
fixing first access
LuciaM1 Jul 19, 2024
93ae332
feat: e9717a1524d4d37caba55db816cf7f75803e5611
actions-user Jul 19, 2024
1dde7c8
pom.xml updated with new version 1.19.0-dev.4
actions-user Jul 19, 2024
1c0694f
Chart.yaml updated with new version v1.19.0-dev.4
actions-user Jul 19, 2024
2034e93
feat: docker-image: v1.19.0-dev.4, chart: v1.19.0-dev.4
actions-user Jul 19, 2024
79bc569
feat: e9717a1524d4d37caba55db816cf7f75803e5611
actions-user Jul 19, 2024
93e1906
pom.xml updated with new version 1.19.0-dev.5
actions-user Jul 19, 2024
0936957
Chart.yaml updated with new version v1.19.0-dev.5
actions-user Jul 19, 2024
61b96aa
feat: docker-image: v1.19.0-dev.5, chart: v1.19.0-dev.5
actions-user Jul 19, 2024
9115929
adding update user with profiles (#174)
LuciaM1 Jul 19, 2024
0485811
feat: 9115929d7db1fb89e6eb02692d6349f9076c6ee6
actions-user Jul 22, 2024
11886af
pom.xml updated with new version 1.19.0-dev.6
actions-user Jul 22, 2024
92b06f7
Chart.yaml updated with new version v1.19.0-dev.6
actions-user Jul 22, 2024
c70b91b
feat: docker-image: v1.19.0-dev.6, chart: v1.19.0-dev.6
actions-user Jul 22, 2024
6432900
fixing first access
LuciaM1 Jul 22, 2024
e2347fc
Add user getAll filtered
EmanueleValentini1 Jul 22, 2024
f92bb67
feat: e2347fca3126e292dfb952829f65ce3d9a8ebdc9
actions-user Jul 22, 2024
cfebd8e
pom.xml updated with new version 1.19.0-dev.7
actions-user Jul 22, 2024
d41fb29
Chart.yaml updated with new version v1.19.0-dev.7
actions-user Jul 22, 2024
988e579
feat: docker-image: v1.19.0-dev.7, chart: v1.19.0-dev.7
actions-user Jul 22, 2024
569e62e
Fix filters
EmanueleValentini1 Jul 22, 2024
fe639cc
feat: 569e62e9378465194cf7e3a26cad6ce5b4211768
actions-user Jul 22, 2024
c59bb3f
pom.xml updated with new version 1.19.0-dev.8
actions-user Jul 22, 2024
a5b535a
Chart.yaml updated with new version v1.19.0-dev.8
actions-user Jul 22, 2024
755ab74
feat: docker-image: v1.19.0-dev.8, chart: v1.19.0-dev.8
actions-user Jul 22, 2024
2f8c1a9
UserPool first impl
EmanueleValentini1 Jul 23, 2024
fa0e92d
fix pom
EmanueleValentini1 Jul 23, 2024
9dd051d
Restore changes
EmanueleValentini1 Jul 23, 2024
faac3de
Integrating multiple resource create (#175)
LuciaM1 Jul 29, 2024
8195962
feat: faac3dedff4f071f9e8b4bd494a8d9f0d81878c3
actions-user Jul 29, 2024
0ac1205
pom.xml updated with new version 1.19.0-dev.9
actions-user Jul 29, 2024
714cbba
Chart.yaml updated with new version v1.19.0-dev.9
actions-user Jul 29, 2024
68fa703
feat: docker-image: v1.19.0-dev.9, chart: v1.19.0-dev.9
actions-user Jul 29, 2024
f1a9abf
Remove user and profiles
EmanueleValentini1 Jul 31, 2024
0275782
Fix
EmanueleValentini1 Jul 31, 2024
4cb415f
feat: 027578201af12e047cba27c35ae2e34b5db23781
actions-user Jul 31, 2024
3ddb49f
pom.xml updated with new version 1.19.0-dev.10
actions-user Jul 31, 2024
3447787
Chart.yaml updated with new version v1.19.0-dev.10
actions-user Jul 31, 2024
8d77603
feat: docker-image: v1.19.0-dev.10, chart: v1.19.0-dev.10
actions-user Jul 31, 2024
480464a
fixing error message
LuciaM1 Jul 31, 2024
16b5428
feat: 480464a11484579cf5fbbae26cbf740a16ae2868
actions-user Jul 31, 2024
f28aca2
pom.xml updated with new version 1.19.0-dev.11
actions-user Jul 31, 2024
1c48342
Chart.yaml updated with new version v1.19.0-dev.11
actions-user Jul 31, 2024
7554d92
feat: docker-image: v1.19.0-dev.11, chart: v1.19.0-dev.11
actions-user Jul 31, 2024
a9f65e5
Merge remote-tracking branch 'origin/uat' into dev
LuciaM1 Jul 31, 2024
2257883
fixing pom
LuciaM1 Jul 31, 2024
d1aa508
fixing pom
LuciaM1 Jul 31, 2024
0516925
feat: d1aa508d161a6ab63b33c60c54a040b63aa8ff10
actions-user Jul 31, 2024
4c82017
pom.xml updated with new version 1.20.0-dev.1
actions-user Jul 31, 2024
079e946
Chart.yaml updated with new version v1.20.0-dev.1
actions-user Jul 31, 2024
b7443a0
feat: d1aa508d161a6ab63b33c60c54a040b63aa8ff10
actions-user Jul 31, 2024
851772c
pom.xml updated with new version 1.20.0-dev.1
actions-user Jul 31, 2024
f30cd09
Chart.yaml updated with new version v1.20.0-dev.1
actions-user Jul 31, 2024
d5ff9f6
feat: docker-image: v1.20.0-dev.1, chart: v1.20.0-dev.1
actions-user Jul 31, 2024
a4359e1
feat: d1aa508d161a6ab63b33c60c54a040b63aa8ff10
actions-user Jul 31, 2024
0233372
pom.xml updated with new version 1.20.0-dev.2
actions-user Jul 31, 2024
b9a5c21
Chart.yaml updated with new version v1.20.0-dev.2
actions-user Jul 31, 2024
54998f2
feat: docker-image: v1.20.0-dev.2, chart: v1.20.0-dev.2
actions-user Jul 31, 2024
ee820f2
fixing resource update
LuciaM1 Aug 1, 2024
0e59ccc
feat: ee820f26941ddd7e452c31ee611e776da99f3843
actions-user Aug 1, 2024
2a9e704
pom.xml updated with new version 1.20.0-dev.3
actions-user Aug 1, 2024
e697146
Chart.yaml updated with new version v1.20.0-dev.3
actions-user Aug 1, 2024
a3dd479
feat: docker-image: v1.20.0-dev.3, chart: v1.20.0-dev.3
actions-user Aug 1, 2024
0ee262c
feat: fe5eec4af8bacbd26dbc7e6ffed29a84a76c4514
actions-user Jul 31, 2024
aad08ca
feat: docker-image: v1.20.0, chart: v1.20.0
actions-user Jul 31, 2024
9f9d6df
Merge remote-tracking branch 'origin/uat' into dev
LuciaM1 Aug 1, 2024
2af421c
changed the maxLength of filename
ElisKina-dev Sep 3, 2024
734cc50
feat: 2af421cdf6f31a4efc8e6fac07cf917235dfae60
actions-user Sep 3, 2024
dcd7171
pom.xml updated with new version 1.21.0-dev.1
actions-user Sep 3, 2024
96dcd79
Chart.yaml updated with new version v1.21.0-dev.1
actions-user Sep 3, 2024
1dc3176
feat: docker-image: v1.21.0-dev.1, chart: v1.21.0-dev.1
actions-user Sep 3, 2024
4894452
fixing multiple rollback
LuciaM1 Sep 9, 2024
18e0b4c
feat: 489445220673061306e1bf69cf46dd427d4abe3b
actions-user Sep 9, 2024
ff0f220
pom.xml updated with new version 1.21.0-dev.2
actions-user Sep 9, 2024
df0fbb7
Chart.yaml updated with new version v1.21.0-dev.2
actions-user Sep 9, 2024
f11c824
feat: docker-image: v1.21.0-dev.2, chart: v1.21.0-dev.2
actions-user Sep 9, 2024
8dc2a4e
Merge remote-tracking branch 'origin/uat' into dev
EmanueleValentini1 Sep 18, 2024
4ea98d7
feat: 8dc2a4e8eab2027b125609eb3b24516482f18efc
actions-user Sep 18, 2024
74cf02d
pom.xml updated with new version 1.24.0-dev.1
actions-user Sep 18, 2024
dc0f7b5
Chart.yaml updated with new version v1.24.0-dev.1
actions-user Sep 18, 2024
067f756
feat: docker-image: v1.24.0-dev.1, chart: v1.24.0-dev.1
actions-user Sep 18, 2024
4a34bdc
sonarcloud fixes
LuciaM1 Sep 20, 2024
eed3549
feat: 4a34bdcc5c7373d1ad1298d34d78615202bd4934
actions-user Sep 20, 2024
15144c3
pom.xml updated with new version 1.24.0-dev.2
actions-user Sep 20, 2024
881f03d
Chart.yaml updated with new version v1.24.0-dev.2
actions-user Sep 20, 2024
3afb4dd
feat: docker-image: v1.24.0-dev.2, chart: v1.24.0-dev.2
actions-user Sep 20, 2024
896c4d3
Merge remote-tracking branch 'origin/uat' into dev
LuciaM1 Sep 20, 2024
6410309
sonarcloud fixes
LuciaM1 Sep 20, 2024
ad859bf
sonarcloud fixes
LuciaM1 Sep 20, 2024
87b8d84
feat: ad859bfec680e63a67f589b0ef6aaabaef6eadda
actions-user Sep 20, 2024
a68fb7e
pom.xml updated with new version 1.25.0-dev.1
actions-user Sep 20, 2024
d0eb348
Chart.yaml updated with new version v1.25.0-dev.1
actions-user Sep 20, 2024
652f75b
feat: docker-image: v1.25.0-dev.1, chart: v1.25.0-dev.1
actions-user Sep 20, 2024
e6e03da
rolling back FromStringToFile
LuciaM1 Sep 20, 2024
9ffee8f
feat: e6e03daac48b269ebc7547020885407f65be4a3c
actions-user Sep 20, 2024
187d13b
pom.xml updated with new version 1.25.0-dev.2
actions-user Sep 20, 2024
844a0c8
Chart.yaml updated with new version v1.25.0-dev.2
actions-user Sep 20, 2024
24e1a00
feat: docker-image: v1.25.0-dev.2, chart: v1.25.0-dev.2
actions-user Sep 20, 2024
ea42077
feat: e6e03daac48b269ebc7547020885407f65be4a3c
actions-user Sep 20, 2024
dc3a8ba
pom.xml updated with new version 1.25.0-dev.3
actions-user Sep 20, 2024
3d3950d
Chart.yaml updated with new version v1.25.0-dev.3
actions-user Sep 20, 2024
cc6e64d
feat: docker-image: v1.25.0-dev.3, chart: v1.25.0-dev.3
actions-user Sep 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions _TMP/coverage-results.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

# Coverage Report: JaCoCo

* IntegrationTest (QuarkusTest)
* S3PreSignerLocalTest (QuarkusTest)


| Outcome | Value |
|-------------------------|---------------------------------------------------------------------|
| Code Coverage % | 92.04% |
| :heavy_check_mark: Number of Lines Covered | 2266 |
| :x: Number of Lines Missed | 196 |
| Total Number of Lines | 2462 |
| Code Coverage % | 92.08% |
| :heavy_check_mark: Number of Lines Covered | 2268 |
| :x: Number of Lines Missed | 195 |
| Total Number of Lines | 2463 |


## Details:
Expand Down Expand Up @@ -902,7 +902,7 @@

#### Lines Missed:

- Line #107
- Line #109
```
} catch (IOException e) {
```
Expand Down
2 changes: 1 addition & 1 deletion helm-chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: v1.24.0
version: v1.25.0-dev.3
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>it.gov.pagopa</groupId>
<artifactId>atm-layer-model</artifactId>
<version>1.24.0</version>
<version>1.25.0-dev.3</version>
<name>atm-layer-model</name>
<properties>
<compiler-plugin.version>3.11.0</compiler-plugin.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public List<ResourceCreationDto> convertToResourceCreationDtoList(ResourceMultip
for (int i = 0; i < multipleDto.getFilenameList().size(); i++) {
ResourceCreationDto resourceCreationDto = new ResourceCreationDto();

resourceCreationDto.setFile(fromStringToFile(multipleDto.getFileList().get(i), multipleDto.getPath()));
resourceCreationDto.setFile(fromStringToFile(multipleDto.getFileList().get(i)));
resourceCreationDto.setFilename(multipleDto.getFilenameList().get(i));
resourceCreationDto.setResourceType(multipleDto.getResourceType());
resourceCreationDto.setPath(multipleDto.getPath());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,6 @@ public BpmnResource(BpmnVersionService bpmnVersionService, BpmnBankConfigService
this.tracer = tracer;
}

// @GET
// @Produces(MediaType.APPLICATION_JSON)
// public Uni<List<BpmnDTO>> getAllBpmn() {
// return this.bpmnVersionService.getAll()
// .onItem()
// .transform(Unchecked.function(list -> {
// if (list.isEmpty()) {
// log.info("No BPMN files saved in database");
// }
// return bpmnVersionMapper.toDTOList(list);
// }));
// }

@GET
@Path("/{bpmnId}/version/{version}")
@Consumes(MediaType.APPLICATION_JSON)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,19 +105,6 @@ public Uni<ResourceDTO> updateResource(@RequestBody(required = true) @FormParam(
.transformToUni(updatedResource -> Uni.createFrom().item(resourceEntityMapper.toDTO(updatedResource)));
}

// @GET
// @Produces(MediaType.APPLICATION_JSON)
// public Uni<List<ResourceDTO>> getAll() {
// return this.resourceEntityService.getAll()
// .onItem()
// .transform(Unchecked.function(list -> {
// if (list.isEmpty()) {
// log.info("No Resource files saved in database");
// }
// return resourceEntityMapper.toDTOList(list);
// }));
// }

@GET
@Path("/{uuid}")
@Produces(MediaType.APPLICATION_JSON)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,6 @@ public WorkflowResourceResource(WorkflowResourceService workflowResourceService,
this.tracer = tracer;
}

// @GET
// @Produces(MediaType.APPLICATION_JSON)
// public Uni<List<WorkflowResourceDTO>> getAll() {
// return this.workflowResourceService.getAll()
// .onItem()
// .transform(Unchecked.function(list -> {
// if (list.isEmpty()) {
// log.info("No Workflow Resource files saved in database");
// }
// return workflowResourceMapper.toDTOList(list);
// }));
// }

@GET
@Path("/filter")
@Produces(MediaType.APPLICATION_JSON)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,39 +152,37 @@ public Uni<List<String>> createResourceMultiple(List<ResourceEntity> resourceEnt
return findBySHA256(resourceEntity.getSha256())
.onItem().transformToUni(x -> {
if (x.isPresent()) {
errors.add(String.format("File %s: Esiste già una risorsa con lo stesso contenuto", filename));
errors.add(String.format("%s-Esiste già una risorsa con lo stesso contenuto", filename));
return Uni.createFrom().nullItem();
}
return resourceFileService.findByStorageKey(resourceEntity.getStorageKey())
.onItem()
.transformToUni(resource -> {
if (resource.isPresent()) {
errors.add(String.format("File %s: Impossibile caricare: la risorsa con lo stesso nome file e percorso esiste già", filename));
errors.add(String.format("%s-Impossibile caricare: la risorsa con lo stesso nome file e percorso esiste già", filename));
return Uni.createFrom().nullItem();
}
return saveAndUpload(resourceEntity, file, filename, resourceCreationDtoList.get(index).getPath())
.onItem().transformToUni(bpmn -> this.findByUUID(resourceEntity.getResourceId())
.onItem().transformToUni(optionalResource -> {
if (optionalResource.isEmpty()) {
errors.add(String.format("File %s: Problema di sincronizzazione sulla creazione della risorsa", filename));
errors.add(String.format("%s-Problema di sincronizzazione sulla creazione della risorsa", filename));
return Uni.createFrom().nullItem();
}
return Uni.createFrom().item(optionalResource.get());
}));
});
})
.onFailure().recoverWithItem(throwable -> {
errors.add(String.format("File %s: %s", filename, throwable.getMessage()));
errors.add(String.format("%s: %s", filename, throwable.getMessage()));
return null;
});
})
.collect().asList()
.onItem().transform(resourceDTOList -> {
if (!errors.isEmpty()) {
throw new AtmLayerException("Alcuni file non sono stati creati: " + String.join(", ", errors),
throw new AtmLayerException("Errore nel caricamento dovuto ai seguenti file: " + String.join(", ", errors),
Response.Status.BAD_REQUEST, RESOURCES_CREATION_ERROR);
} else {
errors.add("file creati senza errori");
}
return errors; // This will be empty if no errors occurred
});
Expand All @@ -202,9 +200,6 @@ public Uni<ResourceEntity> updateResource(UUID uuid, File file) {
}
ResourceEntity resourceEntity = optionalResource.get();
String newFileSha256 = calculateSha256(file);
// if (Objects.equals(resourceEntity.getSha256(), newFileSha256)) {
// throw new AtmLayerException("La risorsa è già presente", Response.Status.BAD_REQUEST, RESOURCE_WITH_SAME_SHA256_ALREADY_EXISTS);
// }
return findBySHA256(newFileSha256)
.onItem().transformToUni(Unchecked.function(x -> {
if (x.isPresent()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,20 @@
@ApplicationScoped
@Slf4j
public class ResourceEntityStorageServiceImpl implements ResourceEntityStorageService {
@Inject
ObjectStoreStrategy objectStoreStrategy;
private final ObjectStoreStrategy objectStoreStrategy;
private final ObjectStoreService objectStoreService;
@Inject
ObjectStoreProperties objectStoreProperties;
@Inject
ResourceFileService resourceFileService;
private final ObjectStoreProperties objectStoreProperties;
private final ResourceFileService resourceFileService;

@Inject
public ResourceEntityStorageServiceImpl(ObjectStoreStrategy objectStoreStrategy,
ObjectStoreProperties objectStoreProperties) {
ObjectStoreProperties objectStoreProperties,
ResourceFileService resourceFileService) {
this.objectStoreStrategy = objectStoreStrategy;
this.objectStoreService = objectStoreStrategy.getType(
ObjectStoreStrategyEnum.fromValue(objectStoreProperties.type()));
this.objectStoreProperties = objectStoreProperties;
this.resourceFileService = resourceFileService;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
import java.io.FileOutputStream;
import java.io.IOException;
import java.math.BigInteger;
import java.nio.file.Files;
import java.nio.file.Path;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Base64;
Expand Down Expand Up @@ -93,7 +95,7 @@ public static String toHexString(byte[] hash) {
return hexString.toString();
}

public static File fromStringToFile(String fileBase64, String fileName) {
public static File fromStringToFile(String fileBase64) {
try {
byte[] decodedBytes = Base64.getDecoder().decode(fileBase64);
File tempFile = File.createTempFile("tempfile", ".tmp");
Expand All @@ -111,25 +113,4 @@ public static File fromStringToFile(String fileBase64, String fileName) {
}


// public static boolean isExtensionValid(File file, String fileName) throws IOException, MimeTypeException {
// String detectedExtension = getExtension(file);
// String extension = FilenameUtils.getExtension(fileName);
// if (Objects.equals(extension, "bpmn") || Objects.equals(extension, "dmn")) {
// extension = UtilityValues.XML_EXTENSION.getValue();
// }
// if (Objects.equals(extension, "form")) {
// extension = UtilityValues.TXT_EXTENSION.getValue();
// }
// return Objects.equals(extension, detectedExtension);
// }
//
// public static String getExtension(File file) throws IOException, MimeTypeException {
// Tika tika = new Tika();
// String mimeType = tika.detect(file);
// log.info("Detected mimeType: {}", mimeType);
// MimeTypes allTypes = MimeTypes.getDefaultMimeTypes();
// MimeType type = allTypes.forName(mimeType);
// return type.getExtension().replace(".", "");
// }

}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ void testJsonPropertyOrder() {
.message("Invalid input data")
.build();

ObjectMapper objectMapper = new ObjectMapper();
try {
String json = objectMapper.writeValueAsString(errorResponse);
assertTrue(json.contains("\"type\":\"Validation Error\""));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,66 +47,6 @@ class BpmnResourceTest {
@InjectMock
BpmnBankConfigService bpmnBankConfigService;

// @Test
// void testGetAllBpmn() {
// List<BpmnVersion> bpmnList = new ArrayList<>();
// BpmnVersion bpmnVersion = new BpmnVersion();
// bpmnList.add(bpmnVersion);
// List<BpmnDTO> dtoList = new ArrayList<>();
// BpmnDTO bpmnDTO = new BpmnDTO();
// dtoList.add(bpmnDTO);
// when(bpmnVersionService.getAll()).thenReturn(Uni.createFrom().item(bpmnList));
// when(bpmnVersionMapper.toDTOList(any(ArrayList.class))).thenReturn(dtoList);
// ArrayList result = given()
// .when().get("/api/v1/model/bpmn")
// .then()
// .statusCode(200)
// .extract()
// .body()
// .as(ArrayList.class);
// assertEquals(1, result.size());
// verify(bpmnVersionService, times(1)).getAll();
// verify(bpmnVersionMapper, times(1)).toDTOList(bpmnList);
// }

// @Test
// void testGetAllEmptyList() {
// List<BpmnVersion> bpmnList = new ArrayList<>();
// List<BpmnDTO> dtoList = new ArrayList<>();
// when(bpmnVersionService.getAll()).thenReturn(Uni.createFrom().item(bpmnList));
// when(bpmnVersionMapper.toDTOList(any(ArrayList.class))).thenReturn(dtoList);
// ArrayList result = given()
// .when().get("/api/v1/model/bpmn")
// .then()
// .statusCode(200)
// .extract()
// .body()
// .as(ArrayList.class);
// assertEquals(0, result.size());
// verify(bpmnVersionService, times(1)).getAll();
// verify(bpmnVersionMapper, times(1)).toDTOList(bpmnList);
// }

// @Test
// void testGetAllBpmnEmptyList() {
// List<BpmnVersion> bpmnList = new ArrayList<>();
// BpmnVersion bpmnVersion = new BpmnVersion();
// bpmnList.add(bpmnVersion);
// List<BpmnDTO> dtoList = new ArrayList<>();
// when(bpmnVersionService.getAll()).thenReturn(Uni.createFrom().item(bpmnList));
// when(bpmnVersionMapper.toDTOList(any(ArrayList.class))).thenReturn(dtoList);
// ArrayList result = given()
// .when().get("/api/v1/model/bpmn")
// .then()
// .statusCode(200)
// .extract()
// .body()
// .as(ArrayList.class);
// Assertions.assertTrue(result.isEmpty());
// verify(bpmnVersionService, times(1)).getAll();
// verify(bpmnVersionMapper, times(1)).toDTOList(bpmnList);
// }

@Test
void testGetEncodedFileOK() {
BpmnVersion bpmnVersion = new BpmnVersion();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,43 +81,6 @@ void testUpdateResource() {
assertEquals(resourceDTO, result);
}


// @Test
// void testGetAllResources() {
// List<ResourceEntity> resourceEntities = new ArrayList<>();
// ResourceEntity resourceEntity = new ResourceEntity();
// resourceEntities.add(resourceEntity);
// List<ResourceDTO> dtoList = new ArrayList<>();
// ResourceDTO resourceDTO = new ResourceDTO();
// dtoList.add(resourceDTO);
// when(resourceEntityService.getAll()).thenReturn(Uni.createFrom().item(resourceEntities));
// when(resourceEntityMapper.toDTOList(any(ArrayList.class))).thenReturn(dtoList);
// ArrayList result = given()
// .when().get("/api/v1/model/resources")
// .then()
// .statusCode(200)
// .extract()
// .body()
// .as(ArrayList.class);
// assertEquals(1, result.size());
// verify(resourceEntityService, times(1)).getAll();
// verify(resourceEntityMapper, times(1)).toDTOList(resourceEntities);
// }

// @Test
// void testGetAllResourcesEmptyList() {
// List<ResourceEntity> emptyList = new ArrayList<>();
//
// when(resourceEntityService.getAll()).thenReturn(Uni.createFrom().item(emptyList));
//
// given()
// .when().get("/api/v1/model/resources")
// .then()
// .statusCode(200);
//
// verify(resourceEntityService, times(1)).getAll();
// }

@Test
void testGetResourceById() {
UUID uuid = UUID.randomUUID();
Expand Down
Loading
Loading