use of com.enonic.xp.task.TaskInfoJson in project xp by enonic.
the class TaskResource method getTask.
@GET
@Path("/{taskId}")
public TaskInfoJson getTask(@PathParam("taskId") final String taskIdString) {
final TaskId taskId = TaskId.from(taskIdString);
final TaskInfo taskInfo = taskService.getTaskInfo(taskId);
if (taskInfo == null) {
throw new WebApplicationException(String.format("Task [%s] was not found", taskIdString), Response.Status.NOT_FOUND);
}
return new TaskInfoJson(taskInfo);
}
Aggregations