Package formflow.library.data
Class SubmissionRepositoryService
java.lang.Object
formflow.library.data.SubmissionRepositoryService
Service to retrieve and store Submission objects in the database.
-
Constructor Summary
ConstructorsConstructorDescriptionSubmissionRepositoryService(SubmissionRepository repository, SubmissionEncryptionService encryptionService) -
Method Summary
Modifier and TypeMethodDescriptionSearches for a particular Submission by itsidvoidremoveFlowCSRF(Submission submission) Removes the CSRF from the Submission's input data, if found.voidremoveSubflowCSRF(Submission submission, String subflowName) Removes the CSRF from a particular Submission's Subflow's iteration data, if found.save(Submission submission) Saves the Submission in the database.
-
Constructor Details
-
SubmissionRepositoryService
public SubmissionRepositoryService(SubmissionRepository repository, SubmissionEncryptionService encryptionService)
-
-
Method Details
-
save
Saves the Submission in the database.- Parameters:
submission- the submission to save, not null- Returns:
- UUID of the saved submission
-
findById
Searches for a particular Submission by itsid- Parameters:
id- id of submission to look for, not null- Returns:
- Optional containing Submission if found, else empty
-
removeFlowCSRF
Removes the CSRF from the Submission's input data, if found.- Parameters:
submission- submission to remove the CSRF from, not null
-
removeSubflowCSRF
Removes the CSRF from a particular Submission's Subflow's iteration data, if found.This will remove the CSRF from all the iterations in the subflow.
- Parameters:
submission- submission to look for subflows in, not nullsubflowName- the subflow to remove the CSRF from, not null
-