Package com.avoka.fc.core.service
Class SubmissionStatusService
- java.lang.Object
-
- com.avoka.fc.core.service.BaseService
-
- com.avoka.fc.core.service.CayenneService
-
- com.avoka.fc.core.service.SubmissionStatusService
-
public class SubmissionStatusService extends CayenneService
Provides submission status service which is responsible for managing submission state changes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SubmissionStatusService.StatusChange
The submission status change.
-
Field Summary
Fields Modifier and Type Field Description static String
SYSTEM_PROPERTY_LEGACY_ADDRESS_LOOKUP
Java system property that controls usage of the legacy address lookup code (Mastersoft)
-
Constructor Summary
Constructors Constructor Description SubmissionStatusService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canChangeDeliveryStatus(Submission submission, String newDeliveryStatus)
Check whether a submission can be manually updated to a given delivery status.protected void
invokeSubmissionCompletedProcessor(ISubmissionCompletedProcessor completedProcessor, Submission submission)
Invoke the given Submission Completed Process against the given submission.void
reassignTaskSubmission(Submission submission, UserAccount newAssignee, HttpServletRequest request)
Reassign the task submission to the specified user account.boolean
resetTaskSubmission(Submission submission)
Reset a task submission that has been abandoned or rejected by the user.void
unassignTaskSubmission(Submission submission, HttpServletRequest request)
Unassign the task submission, removing the user associated with it.void
updateAttachmentStatusManually(Submission submission, String attachmentStatus)
Update the submission attachment status manually by specifying the new attachment status.void
updateDeliveryStatusManually(Submission submission, String deliveryStatus)
Update the submission delivery status manually by specifying the new delivery status.void
updateEmailVerificationStatusManually(Submission submission, String emailVerificationStatus)
Update the submission email verification status manually by specifying the new status.void
updateFileUploadVirusStatusManually(FileUpload fileUpload, String newVirusStatus)
Update the attachment virus status manually by specifying the new status.boolean
updateFormStatusManually(Submission submission, String formStatus)
Update the submission form status manually by specifying the new form status.void
updatePaymentStatusManually(Submission submission, String paymentStatus)
Update the submission payment status manually by specifying the new payment status.void
updateReceiptStatusManuallyToReady(Submission submission)
Update the submission receipt status manually to ready status, deleting any previously generated PDF receipt data.SubmissionStatusService.StatusChange
updateStatus(Submission submission)
Update the status of the submission and commits the changes.SubmissionStatusService.StatusChange
updateStatus(Submission submission, Document document)
Update the status of the submission and commits the changes.protected boolean
virusScanComplete(Submission submission)
Check whether the virus scan has been performed for all attachments associated with the submission.-
Methods inherited from class com.avoka.fc.core.service.CayenneService
commitChanges, deleteObject, deleteObjects, findObject, getDataContext, getDataDomain, getObjectForPK, getObjectStore, newObject, performNamedQuery, performNamedQuery, performNamedQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performQuery, performQuery, refetchEntity, refetchObject, registerNewObject, rollbackChanges, toMap, toMap
-
Methods inherited from class com.avoka.fc.core.service.BaseService
getLogger
-
-
-
-
Field Detail
-
SYSTEM_PROPERTY_LEGACY_ADDRESS_LOOKUP
public static final String SYSTEM_PROPERTY_LEGACY_ADDRESS_LOOKUP
Java system property that controls usage of the legacy address lookup code (Mastersoft)- See Also:
- Constant Field Values
-
-
Method Detail
-
updateStatus
public SubmissionStatusService.StatusChange updateStatus(Submission submission)
Update the status of the submission and commits the changes. Note that this method contains database transactions.- Parameters:
submission
- the submission- Returns:
- the submission status change
- Since:
- 4.0.0
-
updateStatus
public SubmissionStatusService.StatusChange updateStatus(Submission submission, Document document)
Update the status of the submission and commits the changes. Note that this method contains database transactions.- Parameters:
submission
- the submission (required)document
- the document- Returns:
- the submission status change
- Since:
- 18.5.0
-
updateFormStatusManually
public boolean updateFormStatusManually(Submission submission, String formStatus)
Update the submission form status manually by specifying the new form status. Supported status changes include [ Saved | Completed | Abandoned ]. Note that this method contains database transactions.- Parameters:
submission
- the submission to update (must not have been marked as ineligible - seeSubmission.isAbandonmentTypeIneligible()
formStatus
- the new form status- Returns:
- true if the submission form status was updated or false otherwise
- Since:
- 3.6.0
-
updateAttachmentStatusManually
public void updateAttachmentStatusManually(Submission submission, String attachmentStatus)
Update the submission attachment status manually by specifying the new attachment status. Note that this method contains database transactions.- Parameters:
submission
- the submission to updateattachmentStatus
- new attachment status
-
updateReceiptStatusManuallyToReady
public void updateReceiptStatusManuallyToReady(Submission submission)
Update the submission receipt status manually to ready status, deleting any previously generated PDF receipt data. Note that this method contains database transactions.- Parameters:
submission
- the submission to update (required)- Since:
- 4.2.0
-
updateFileUploadVirusStatusManually
public void updateFileUploadVirusStatusManually(FileUpload fileUpload, String newVirusStatus)
Update the attachment virus status manually by specifying the new status. Note that this method contains database transactions.- Parameters:
fileUpload
- the file upload to update (required, must have a virus scan status of "Error")newVirusStatus
- new virus status- Since:
- 4.0.1
-
updatePaymentStatusManually
public void updatePaymentStatusManually(Submission submission, String paymentStatus)
Update the submission payment status manually by specifying the new payment status. Note that this method contains database transactions.- Parameters:
submission
- the submission to updatepaymentStatus
- new payment status
-
updateEmailVerificationStatusManually
public void updateEmailVerificationStatusManually(Submission submission, String emailVerificationStatus)
Update the submission email verification status manually by specifying the new status. Note that this method contains database transactions.- Parameters:
submission
- the submission to updateemailVerificationStatus
- new email verification status
-
updateDeliveryStatusManually
public void updateDeliveryStatusManually(Submission submission, String deliveryStatus)
Update the submission delivery status manually by specifying the new delivery status. Rules: The new delivery status must be valid Note that this method contains database transactions.- Parameters:
submission
- the submission to updatedeliveryStatus
- new delivery status
-
reassignTaskSubmission
public void reassignTaskSubmission(Submission submission, UserAccount newAssignee, HttpServletRequest request)
Reassign the task submission to the specified user account. The submission must be assigned to one or more form groups. The new assignee must be in the appropriate group(s) with save access. The current user must be the same as the new assignee, or must have permission to assign tasks to other users.- Parameters:
submission
- the task submission (required)newAssignee
- the user account to whom the task will be assigned (required)request
- the HTTP servlet request (required)- Since:
- 4.1.0
-
canChangeDeliveryStatus
public boolean canChangeDeliveryStatus(Submission submission, String newDeliveryStatus)
Check whether a submission can be manually updated to a given delivery status.- Parameters:
submission
- the submission (required)newDeliveryStatus
- the new delivery status- Returns:
- true if the status change is permissible, false otherwise
- Since:
- 18.11.0
-
unassignTaskSubmission
public void unassignTaskSubmission(Submission submission, HttpServletRequest request)
Unassign the task submission, removing the user associated with it. The submission must be associated with one or more work groups and be assigned to the current user, or the user must have permission to unassign tasks from other users.- Parameters:
submission
- the task submission (required)request
- the HTTP servlet request (required)- Since:
- 4.1.0
-
resetTaskSubmission
public boolean resetTaskSubmission(Submission submission)
Reset a task submission that has been abandoned or rejected by the user. The task will be reset to "Assigned" and the most recent assigned task data will be used.- Parameters:
submission
- the submission (required, must be a task, form status must not be "Completed", "Expired" or "Assigned")- Returns:
- true if the task submission was reset successfully
- Since:
- 4.1.0
-
invokeSubmissionCompletedProcessor
protected void invokeSubmissionCompletedProcessor(ISubmissionCompletedProcessor completedProcessor, Submission submission)
Invoke the given Submission Completed Process against the given submission.- Parameters:
completedProcessor
- the submission compled processorsubmission
- the submission object- Since:
- 3.6.0
-
virusScanComplete
protected boolean virusScanComplete(Submission submission)
Check whether the virus scan has been performed for all attachments associated with the submission.- Parameters:
submission
- the submission- Returns:
- true if virus scan has been done, otherwise false.
-
-