@Path(value="/tasks/v2")
@Consumes(value={"application/xml","application/json"})
@Produces(value={"application/xml","application/json"})
public interface TaskBlockService
Modifier and Type | Method and Description |
---|---|
void |
abort(java.lang.String taskId)
Aborts an active task.
|
StepBlockState |
addPause(java.lang.String taskId,
java.lang.String stepPath)
Add a pause step at the specified position.
|
void |
archive(java.lang.String taskId)
Archive an executed task.
|
TaskWithBlock |
assign(java.lang.String taskId,
java.lang.String owner)
Assigns a task to a different user.
|
void |
cancel(java.lang.String taskId)
Cancels a stopped task.
|
java.util.List<TaskWithBlock> |
export(org.joda.time.LocalDate begin,
org.joda.time.LocalDate end)
Searches for tasks with detailed step information.
|
java.util.List<TaskWithBlock> |
getAllCurrentTasks()
Returns all active tasks for all users.
|
BlockState |
getBlock(java.lang.String taskId,
java.lang.String blockPath)
Returns a block by ID.
|
java.util.List<TaskWithBlock> |
getMyCurrentTasks()
Returns the active tasks of the logged in user.
|
StepState |
getStep(java.lang.String taskId,
java.lang.String stepPath,
org.joda.time.DateTime ifModifiedSince)
Retrieves information about a step.
|
StepBlockState |
getSteps(java.lang.String taskId,
java.lang.String blockPath)
Returns a block with steps by ID.
|
TaskWithBlock |
getTask(java.lang.String taskId)
Returns a task by ID.
|
java.util.List<TaskWithBlock> |
query(org.joda.time.LocalDate begin,
org.joda.time.LocalDate end)
Searches for archived tasks without step information.
|
void |
schedule(java.lang.String taskId,
org.joda.time.DateTime time)
Schedules a task.
|
TaskWithBlock |
skip(java.lang.String taskId,
java.util.List<java.lang.String> stepIds)
Indicates that one or more steps should be skipped.
|
void |
start(java.lang.String taskId)
Starts a task.
|
void |
stop(java.lang.String taskId)
Gracefully stops an active task.
|
TaskWithBlock |
takeover(java.lang.String taskId,
java.lang.String owner)
Takeover a task from the owner.
|
TaskWithBlock |
unskip(java.lang.String taskId,
java.util.List<java.lang.String> stepIds)
Indicates that one or more steps should no longer be skipped, but executed.
|
@GET @Path(value="current") java.util.List<TaskWithBlock> getMyCurrentTasks()
@GET @Path(value="current/all") java.util.List<TaskWithBlock> getAllCurrentTasks()
@GET @Path(value="{taskid}") TaskWithBlock getTask(@PathParam(value="taskid") java.lang.String taskId)
taskId
- the ID of the task@GET @Path(value="{taskid}/block/{blockPath}") BlockState getBlock(@PathParam(value="taskid") java.lang.String taskId, @PathParam(value="blockPath") java.lang.String blockPath)
taskId
- the ID of the taskblockPath
- the ID of the block@GET @Path(value="{taskid}/block/{blockPath}/step") StepBlockState getSteps(@PathParam(value="taskid") java.lang.String taskId, @PathParam(value="blockPath") java.lang.String blockPath)
taskId
- the ID of the taskblockPath
- the ID of the block@GET @Path(value="{taskid}/step/{stepPath}") StepState getStep(@PathParam(value="taskid") java.lang.String taskId, @PathParam(value="stepPath") java.lang.String stepPath, @HeaderParam(value="If-Modified-Since") org.joda.time.DateTime ifModifiedSince)
taskId
- the ID of the taskstepPath
- the path of the step in the block tree.ifModifiedSince
- the if-modified-since date in RFC 1123 (RFC 822 with 4-digit years) date format.ifModifiedSince
ifModifiedSince
,
otherwise returns a status code of 200 (OK) and the XML containing a StepState.RuntimeException
if the step has not been modified since ifModifiedSince
, otherwise
returns a StepState
@POST @Path(value="{taskid}/start") void start(@PathParam(value="taskid") java.lang.String taskId)
taskId
- the ID of the task@POST @Path(value="{taskid}/schedule") void schedule(@PathParam(value="taskid") java.lang.String taskId, @QueryParam(value="time") org.joda.time.DateTime time)
taskId
- the ID of the tasktime
- the local time (including the local timezone) when the task should be started by the server.@POST @Path(value="{taskid}/stop") void stop(@PathParam(value="taskid") java.lang.String taskId)
taskId
- the ID of the task@POST @Path(value="{taskid}/abort") void abort(@PathParam(value="taskid") java.lang.String taskId)
taskId
- the ID of the task@DELETE @Path(value="{taskid}") void cancel(@PathParam(value="taskid") java.lang.String taskId)
taskId
- the ID of the task@POST @Path(value="{taskid}/archive") void archive(@PathParam(value="taskid") java.lang.String taskId)
taskId
- the ID of the task@POST @Path(value="{taskid}/skip") TaskWithBlock skip(@PathParam(value="taskid") java.lang.String taskId, java.util.List<java.lang.String> stepIds)
taskId
- the ID of the taskstepIds
- the paths of the steps to skip@POST @Path(value="{taskid}/unskip") TaskWithBlock unskip(@PathParam(value="taskid") java.lang.String taskId, java.util.List<java.lang.String> stepIds)
taskId
- the ID of the taskstepIds
- the paths of the steps to unskip@POST @Path(value="{taskid}/add-pause/{stepPath}") StepBlockState addPause(@PathParam(value="taskid") java.lang.String taskId, @PathParam(value="stepPath") java.lang.String stepPath)
taskId
- the ID of the taskstepPath
- the path of the step@POST @Path(value="{taskid}/assign/{owner}") TaskWithBlock assign(@PathParam(value="taskid") java.lang.String taskId, @PathParam(value="owner") java.lang.String owner)
taskId
- the ID of the taskowner
- the name of the user that will be the new owner of the task.@POST @Path(value="{taskid}/takeover/{owner}") TaskWithBlock takeover(@PathParam(value="taskid") java.lang.String taskId, @PathParam(value="owner") java.lang.String owner)
assign(String, String)
method, which allows you to re-assign
a task.taskId
- the ID of the task to take overowner
- the current owner of the task@GET @Path(value="query") java.util.List<TaskWithBlock> query(@QueryParam(value="begindate") org.joda.time.LocalDate begin, @QueryParam(value="enddate") org.joda.time.LocalDate end)
begin
- The first day we want to see tasks from, or null
for no such limit.end
- The last day we want to see tasks from, or null
for no such limit.@GET @Path(value="export") java.util.List<TaskWithBlock> export(@QueryParam(value="begindate") org.joda.time.LocalDate begin, @QueryParam(value="enddate") org.joda.time.LocalDate end)
begin
- The first day we want to see tasks from, or null
for no such limit.end
- The last day we want to see tasks from, or null
for no such limit.