Interface SubmissionService<U>
- Type Parameters:
U
- The type of the submission input used inSubmitSubmissionDto
.
- All Known Implementing Classes:
BaseSubmissionService
Interface for classes that manage
Submission
s.-
Method Summary
Modifier and TypeMethodDescriptionvoid
Deletes the submission with the specified identifier.enqueue
(@Valid SubmitSubmissionDto<U> submission) Enqueues the submission for evaluation.execute
(@Valid SubmitSubmissionDto<U> submission, boolean persist) Executes the submission and returns the evaluation results.Returns the evaluation results for the specified submission.org.springframework.data.domain.Page
<SubmissionDto<U>> getSubmissions
(org.springframework.data.domain.Pageable page, String userFilter, Long taskFilter, String assignmentFilter, SubmissionMode modeFilter) Returns all submissions for the requested page.
-
Method Details
-
enqueue
Enqueues the submission for evaluation.- Parameters:
submission
- The submission.- Returns:
- The submission identifier.
-
execute
Executes the submission and returns the evaluation results.- Parameters:
submission
- The submission.persist
- Whether the submission should be stored permanently.- Returns:
- The evaluation results.
-
getEvaluationResult
Returns the evaluation results for the specified submission.- Parameters:
id
- The submission identifier.- Returns:
- The evaluation results or
null
if the result is not available. - Throws:
jakarta.persistence.EntityNotFoundException
- If the submission does not exist.
-
getSubmissions
org.springframework.data.domain.Page<SubmissionDto<U>> getSubmissions(org.springframework.data.domain.Pageable page, String userFilter, Long taskFilter, String assignmentFilter, SubmissionMode modeFilter) Returns all submissions for the requested page.- Parameters:
page
- The page and sorting information.userFilter
- Optional user filter string (applies equals to userId attribute).taskFilter
- Optional task filter string (applies equals to taskId attribute).assignmentFilter
- Optional assignment filter string (applies equals to assignmentId attribute).modeFilter
- Optional mode filter (applies equals to mode attribute).- Returns:
- List of submissions
-
delete
Deletes the submission with the specified identifier.- Parameters:
id
- The submission identifier.
-