Package pro.taskana.spi.priority.api
Interface PriorityServiceProvider
-
public interface PriorityServiceProviderThe PriorityServiceProvider allows to determine the priority of a Task according to custom logic.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description OptionalIntcalculatePriority(TaskSummary taskSummary)Determine the priority of a certain Task during execution of TaskService.createTask(Task) and TaskService.updateTask(Task).
-
-
-
Method Detail
-
calculatePriority
OptionalInt calculatePriority(TaskSummary taskSummary)
Determine the priority of a certain Task during execution of TaskService.createTask(Task) and TaskService.updateTask(Task). This priority overwrites the priority from Classification-driven logic.The implemented method must calculate the priority efficiently. There can be a huge amount of Tasks the SPI has to handle.
The behaviour is undefined if this method tries to apply persistent changes to any entity.
This SPI is executed with the same UserPrincipal and GroupPrincipal as in TaskService.createTask(Task) or TaskService.updateTask(Task).
- Parameters:
taskSummary- the TaskSummary to compute the priority for- Returns:
- the computed priority
-
-