generated from it-at-m/oss-repository-en-template
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/refactor presigned url usage (#1839)
* cosys-integration add endpoint without presigned url parameter * cosys-integration add new code to tests * mail-integration init endpoint without presigned url parameter * docs endpoints without presigned url parameter * cosys-integration update endpoint without presigned url parameter * mail-integration update endpoint without presigned url parameter * s3-integration mark streaming presigned url as deprecated * update s3 example process without presigned url usage * cosys-integration update endpoint without presigned url parameter * mail-integration update endpoint without presigned url * mail-integration update endpoint without presigned url * mail-integration fix application.yml
- Loading branch information
Showing
55 changed files
with
2,048 additions
and
616 deletions.
There are no files selected for viewing
362 changes: 151 additions & 211 deletions
362
...giwf-engine-service/src/main/resources/prozesse/example/s3-integration/S3TestProzess.bpmn
Large diffs are not rendered by default.
Oops, something went wrong.
373 changes: 373 additions & 0 deletions
373
...ervice/src/main/resources/prozesse/example/s3-integration/S3TestProzessPresignedUrls.bpmn
Large diffs are not rendered by default.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
...ervice/src/main/resources/prozesse/example/s3-integration/s3-presigned.processconfig.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"key": "feature-s3-integration-presigned", | ||
"statusDokument": "", | ||
"configs": [ | ||
{ | ||
"key": "app_file_paths_readonly", | ||
"value": "" | ||
}, | ||
{ | ||
"key": "app_file_paths", | ||
"value": "test" | ||
} | ||
] | ||
} |
31 changes: 31 additions & 0 deletions
31
...va/de/muenchen/oss/digiwf/cosys/integration/adapter/in/streaming/GenerateDocumentDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package de.muenchen.oss.digiwf.cosys.integration.adapter.in.streaming; | ||
|
||
import com.fasterxml.jackson.databind.JsonNode; | ||
import de.muenchen.oss.digiwf.cosys.integration.domain.model.GenerateDocument; | ||
import jakarta.validation.constraints.NotBlank; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.NoArgsConstructor; | ||
|
||
@EqualsAndHashCode(callSuper = true) | ||
@Data | ||
@NoArgsConstructor | ||
public class GenerateDocumentDTO extends GenerateDocument { | ||
@NotBlank | ||
private String fileContext; | ||
|
||
@NotBlank | ||
private String filePath; | ||
|
||
public GenerateDocumentDTO( | ||
@NotBlank(message = "client is mandatory") String client, | ||
@NotBlank(message = "role is mandatory") String role, | ||
@NotBlank(message = "guid is mandatory") String guid, | ||
JsonNode variables, | ||
String fileContext, | ||
String filePath) { | ||
super(client, role, guid, variables); | ||
this.fileContext = fileContext; | ||
this.filePath = filePath; | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
...n/oss/digiwf/cosys/integration/adapter/in/streaming/GenerateDocumentPresignedUrlsDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package de.muenchen.oss.digiwf.cosys.integration.adapter.in.streaming; | ||
|
||
import com.fasterxml.jackson.databind.JsonNode; | ||
import de.muenchen.oss.digiwf.cosys.integration.domain.model.DocumentStorageUrl; | ||
import de.muenchen.oss.digiwf.cosys.integration.domain.model.GenerateDocument; | ||
import jakarta.validation.Valid; | ||
import jakarta.validation.constraints.NotBlank; | ||
import jakarta.validation.constraints.Size; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.List; | ||
|
||
@Deprecated | ||
@EqualsAndHashCode(callSuper = true) | ||
@Data | ||
@NoArgsConstructor | ||
public class GenerateDocumentPresignedUrlsDTO extends GenerateDocument { | ||
/** | ||
* A list of presigned urls that are used to save the cosys documents in a s3 storage | ||
*/ | ||
@Valid | ||
@Size(min = 1, max = 1) | ||
private List<DocumentStorageUrl> documentStorageUrls; | ||
|
||
public GenerateDocumentPresignedUrlsDTO( | ||
@NotBlank(message = "client is mandatory") String client, | ||
@NotBlank(message = "role is mandatory") String role, | ||
@NotBlank(message = "guid is mandatory") String guid, | ||
JsonNode variables, | ||
List<DocumentStorageUrl> documentStorageUrls) { | ||
super(client, role, guid, variables); | ||
this.documentStorageUrls = documentStorageUrls; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 15 additions & 1 deletion
16
...va/de/muenchen/oss/digiwf/cosys/integration/application/port/in/CreateDocumentInPort.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,24 @@ | ||
package de.muenchen.oss.digiwf.cosys.integration.application.port.in; | ||
|
||
import de.muenchen.oss.digiwf.cosys.integration.domain.model.DocumentStorageUrl; | ||
import de.muenchen.oss.digiwf.cosys.integration.domain.model.GenerateDocument; | ||
import jakarta.validation.Valid; | ||
import jakarta.validation.constraints.NotBlank; | ||
import jakarta.validation.constraints.Size; | ||
|
||
import java.util.List; | ||
|
||
public interface CreateDocumentInPort { | ||
|
||
void createDocument(@Valid final GenerateDocument generateDocument); | ||
@Deprecated | ||
void createDocument( | ||
@Valid final GenerateDocument generateDocument, | ||
@Valid @Size(min = 1, max = 1) final List<DocumentStorageUrl> documentStorageUrls | ||
); | ||
|
||
void createDocument( | ||
@Valid final GenerateDocument generateDocument, | ||
@NotBlank final String fileContext, | ||
@NotBlank final String filePath | ||
); | ||
} |
15 changes: 13 additions & 2 deletions
15
.../muenchen/oss/digiwf/cosys/integration/application/port/out/SaveFileToStorageOutPort.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,20 @@ | ||
package de.muenchen.oss.digiwf.cosys.integration.application.port.out; | ||
|
||
import de.muenchen.oss.digiwf.cosys.integration.domain.model.GenerateDocument; | ||
import de.muenchen.oss.digiwf.cosys.integration.domain.model.DocumentStorageUrl; | ||
|
||
import java.util.List; | ||
|
||
public interface SaveFileToStorageOutPort { | ||
@Deprecated | ||
void saveDocumentInStorage( | ||
final List<DocumentStorageUrl> documentStorageUrls, | ||
final byte[] data | ||
); | ||
|
||
void saveDocumentInStorage(final GenerateDocument generateDocument, final byte[] data); | ||
void saveDocumentInStorage( | ||
final String fileContext, | ||
final String filePath, | ||
final byte[] data | ||
); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.