Interface TaskService<T extends Task,S>

Type Parameters:
T - The task type.
S - The type of the additional data used in ModifyTaskDto.
All Known Implementing Classes:
BaseTaskInGroupService, BaseTaskService

@Validated public interface TaskService<T extends Task,S>
Interface for classes that manage Tasks.
  • Method Details

    • get

      Optional<T> get(long id)
      Returns the task with the specified identifier.
      Parameters:
      id - The identifier.
      Returns:
      The task or an empty result if the task does not exist.
    • create

      Creates a new task.
      Parameters:
      id - The task identifier.
      dto - The task data.
      Returns:
      The data that should be sent to the task administration UI (might be null).
      Throws:
      DuplicateKeyException - If a task with the specified identifier already exists.
    • update

      Updates an existing task.
      Parameters:
      id - The task identifier.
      dto - The new task data.
      Returns:
      The data that should be sent to the task administration UI (might be null).
      Throws:
      jakarta.persistence.EntityNotFoundException - If the task does not exist.
    • delete

      void delete(long id)
      Deletes the task with the specified identifier.
      Parameters:
      id - The identifier of the task to delete.