public class SubmissionStatusService extends Object
| Constructor and Description |
|---|
SubmissionStatusService(org.dataconservancy.pass.model.Submission submission)
Initiate service using a Submission object
|
SubmissionStatusService(org.dataconservancy.pass.model.Submission submission,
PassClient client)
Supports setting a specific client, primarily for testing.
|
SubmissionStatusService(URI submissionId)
Initiate service using a `Submission.id`
|
| Modifier and Type | Method and Description |
|---|---|
org.dataconservancy.pass.model.Submission.SubmissionStatus |
calculateAndUpdateSubmissionStatus()
Calculates the appropriate
Submission.SubmissionStatus for the Submission provided. |
org.dataconservancy.pass.model.Submission.SubmissionStatus |
calculateAndUpdateSubmissionStatus(boolean overrideUIStatus)
Calculates the appropriate
Submission.SubmissionStatus for the Submission provided. |
org.dataconservancy.pass.model.Submission.SubmissionStatus |
calculateSubmissionStatus()
Calculates the appropriate
Submission.SubmissionStatus for the Submission provided. |
public SubmissionStatusService(org.dataconservancy.pass.model.Submission submission)
submission - The submissionpublic SubmissionStatusService(URI submissionId)
submissionId - Submission URIpublic SubmissionStatusService(org.dataconservancy.pass.model.Submission submission,
PassClient client)
submission - The submissionclient - PASS clientpublic org.dataconservancy.pass.model.Submission.SubmissionStatus calculateSubmissionStatus()
Submission.SubmissionStatus for the Submission provided.
This is based on the status of associated Deposits and RepositoryCopys for
submitted records, and SubmissionEvents for unsubmitted records.public org.dataconservancy.pass.model.Submission.SubmissionStatus calculateAndUpdateSubmissionStatus()
Submission.SubmissionStatus for the Submission provided.
This is based on the status of associated Deposits and RepositoryCopys for
submitted records, and SubmissionEvents for unsubmitted records then updates
the status as appropriate.
The UI will typically have responsibility for updating the submissionStatus before
the Submission is submitted. Therefore, by default this service will not replace
the existing status of an unsubmitted record unless the starting value was null (i.e. it has not
been populated yet). To override this constraint, and replace the value anyway, use the method
calculateAndUpdateSubmissionStatus(boolean overrideUIStatus) and supply a parameter of true
public org.dataconservancy.pass.model.Submission.SubmissionStatus calculateAndUpdateSubmissionStatus(boolean overrideUIStatus)
Submission.SubmissionStatus for the Submission provided.
This is based on the status of associated Deposits and RepositoryCopys for
submitted records, and SubmissionEvents for unsubmitted records then updates
the status as appropriate.
The UI will typically have responsibility for updating the submissionStatus before
the Submission is submitted. Therefore, by default this service will not replace
the existing status of an unsubmitted record unless the starting value was null (i.e. it has not
been populated yet). To override this constraint, set the overrideUIStatus parameter to
true
overrideUIStatus - - true will override the current pre-submission status on the
Submission record, regardless of whether it was set by the UI.
false will not replace the current submission value, and favor the value set by the UICopyright © 2018. All rights reserved.