generated from pagopa/template-payments-java-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: P4ADEV-1421-fdr-create-temporal-activity (#19)
- Loading branch information
Showing
4 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
src/main/java/it/gov/pagopa/payhub/activities/activity/fdr/FdRIngestionActivity.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,17 @@ | ||
package it.gov.pagopa.payhub.activities.activity.fdr; | ||
import it.gov.pagopa.payhub.activities.dto.fdr.FdRIngestionActivityResult; | ||
|
||
/** | ||
* Interface for the FdRIngestionActivity. | ||
* Defines methods for processing files based on an IngestionFlow ID. | ||
*/ | ||
public interface FdRIngestionActivity { | ||
|
||
/** | ||
* Processes a file based on the provided IngestionFlow ID. | ||
* | ||
* @param ingestionFlowId the unique identifier related to the file to process. | ||
* @return {@link FdRIngestionActivityResult} containing the list of IUFs and status. | ||
*/ | ||
FdRIngestionActivityResult processFile(String ingestionFlowId); | ||
} |
17 changes: 17 additions & 0 deletions
17
...ain/java/it/gov/pagopa/payhub/activities/activity/fdr/SendEmailIngestionFlowActivity.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,17 @@ | ||
package it.gov.pagopa.payhub.activities.activity.fdr; | ||
|
||
/** | ||
* Interface for SendEmailIngestionFlowActivity. | ||
* Sends an email based on the status of a processed file identified by its IngestionFlow ID. | ||
*/ | ||
public interface SendEmailIngestionFlowActivity { | ||
|
||
/** | ||
* Sends an email based on the process result of the given file ingestionFlow ID. | ||
* | ||
* @param ingestionFlowId the unique identifier of the IngestionFlow record related to the imported file. | ||
* @param success true if the process succeeded, false otherwise. | ||
* @return true if the email was sent successfully, false otherwise. | ||
*/ | ||
boolean sendEmail(String ingestionFlowId, boolean success); | ||
} |
17 changes: 17 additions & 0 deletions
17
.../java/it/gov/pagopa/payhub/activities/activity/fdr/UpdateIngestionFlowStatusActivity.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,17 @@ | ||
package it.gov.pagopa.payhub.activities.activity.fdr; | ||
|
||
/** | ||
* Interface for the UpdateIngestionFlowStatusActivity. | ||
* Updates the status of a IngestionFlow record identified by the provided ID. | ||
*/ | ||
public interface UpdateIngestionFlowStatusActivity { | ||
|
||
/** | ||
* Updates the status of the IngestionFlow record corresponding to the given ID. | ||
* | ||
* @param id the unique identifier of the record to update. | ||
* @param newStatus the new status to set. | ||
* @return true if the update was successful, false otherwise. | ||
*/ | ||
boolean updateStatus(String id, String newStatus); | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/java/it/gov/pagopa/payhub/activities/dto/fdr/FdRIngestionActivityResult.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,20 @@ | ||
package it.gov.pagopa.payhub.activities.dto.fdr; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* DTO for the FdRIngestionResponse, representing the result of file processing. | ||
*/ | ||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class FdRIngestionActivityResult { | ||
/** List of extracted IUFs */ | ||
private List<String> iufs; | ||
/** Success flag for the operation */ | ||
private boolean success; | ||
} |