@Path(value="tasks") public interface TaskService extends JAXRSService
DEFAULT_PARAM_PAGE, DEFAULT_PARAM_PAGE_VALUE, DEFAULT_PARAM_SIZE, DEFAULT_PARAM_SIZE_VALUE, PARAM_DETAILS, PARAM_FIQL, PARAM_ORDERBY, PARAM_PAGE, PARAM_SIZE| Modifier and Type | Method and Description |
|---|---|
void |
actionJob(Long taskId,
JobAction action)
Execute a control action on an existing task
|
BulkActionResult |
bulk(BulkAction bulkAction)
Executes the provided bulk action.
|
<T extends SchedTaskTO> |
create(T taskTO)
Creates a new task.
|
void |
delete(Long taskId)
Deletes the task matching the provided id.
|
void |
deleteExecution(Long executionId)
Deletes the task execution matching the provided id.
|
BulkActionResult |
deleteExecutions(Long taskId,
Date startedBefore,
Date startedAfter,
Date endedBefore,
Date endedAfter)
Deletes the task executions belonging to the given task and matching the date conditions.
|
TaskExecTO |
execute(Long taskId,
boolean dryRun)
Executes the task matching the given id.
|
List<JobClass> |
getJobClasses()
Returns a list of classes to be used for jobs.
|
List<PushActionClass> |
getPushActionsClasses()
Returns a list of classes to be used as push actions.
|
List<SyncActionClass> |
getSyncActionsClasses()
Returns a list of classes to be used as synchronization actions.
|
<T extends AbstractTaskTO> |
list(TaskType taskType)
Returns a list of tasks with matching type.
|
<T extends AbstractTaskTO> |
list(TaskType taskType,
Integer page,
Integer size)
Returns a paged list of existing tasks matching type and page/size conditions.
|
<T extends AbstractTaskTO> |
list(TaskType taskType,
Integer page,
Integer size,
String orderBy,
boolean details)
Returns a paged list of existing tasks matching type and page/size conditions.
|
<T extends AbstractTaskTO> |
list(TaskType taskType,
String orderBy)
Returns a list of tasks with matching type.
|
PagedResult<TaskExecTO> |
listExecutions(Long taskId,
Integer page,
Integer size)
Returns the task executions for the given task.
|
List<TaskExecTO> |
listJobs(JobStatusType type)
List task jobs of the given type
|
<T extends AbstractTaskTO> |
read(Long taskId,
boolean details)
Returns the task matching the given id.
|
TaskExecTO |
readExecution(Long executionId)
Returns the task execution with the given id.
|
void |
report(Long executionId,
ReportExecTO reportExec)
Reports task execution result.
|
void |
update(Long taskId,
AbstractTaskTO taskTO)
Updates the task matching the provided id.
|
@GET
@Path(value="jobClasses")
@Produces(value={"application/xml","application/json"})
List<JobClass> getJobClasses()
@GET
@Path(value="syncActionsClasses")
@Produces(value={"application/xml","application/json"})
List<SyncActionClass> getSyncActionsClasses()
@GET
@Path(value="pushActionsClasses")
@Produces(value={"application/xml","application/json"})
List<PushActionClass> getPushActionsClasses()
@GET
@Path(value="{taskId}")
@Produces(value={"application/xml","application/json"})
<T extends AbstractTaskTO> T read(@NotNull@PathParam(value="taskId")
Long taskId,
@QueryParam(value="details")@DefaultValue(value="true")
boolean details)
T - type of taskTOtaskId - id of task to be readdetails - whether include executions or not, defaults to true@GET
@Path(value="executions/{executionId}")
@Produces(value={"application/xml","application/json"})
TaskExecTO readExecution(@NotNull@PathParam(value="executionId")
Long executionId)
executionId - id of task execution to be read@GET
@Produces(value={"application/xml","application/json"})
<T extends AbstractTaskTO> PagedResult<T> list(@NotNull@MatrixParam(value="type")
TaskType taskType)
T - type of taskTOtaskType - type of tasks to be listed@GET
@Produces(value={"application/xml","application/json"})
<T extends AbstractTaskTO> PagedResult<T> list(@NotNull@MatrixParam(value="type")
TaskType taskType,
@QueryParam(value="orderby")
String orderBy)
T - type of taskTOtaskType - type of tasks to be listedorderBy - list of ordering clauses, separated by comma@GET
@Produces(value={"application/xml","application/json"})
<T extends AbstractTaskTO> PagedResult<T> list(@NotNull@MatrixParam(value="type")
TaskType taskType,
@NotNull@Min(value=1L)@QueryParam(value="page")@DefaultValue(value="1")
Integer page,
@NotNull@Min(value=1L)@QueryParam(value="size")@DefaultValue(value="25")
Integer size,
@QueryParam(value="orderby")
String orderBy,
@QueryParam(value="details")@DefaultValue(value="true")
boolean details)
T - type of taskTOtaskType - type of tasks to be listedpage - page number of tasks in relation to page sizesize - number of tasks listed per pageorderBy - list of ordering clauses, separated by commadetails - whether include executions or not, defaults to true@GET
@Produces(value={"application/xml","application/json"})
<T extends AbstractTaskTO> PagedResult<T> list(@MatrixParam(value="type")
TaskType taskType,
@NotNull@Min(value=1L)@QueryParam(value="page")@DefaultValue(value="1")
Integer page,
@NotNull@Min(value=1L)@QueryParam(value="size")@DefaultValue(value="25")
Integer size)
T - type of taskTOtaskType - type of tasks to be listedpage - page number of tasks in relation to page sizesize - number of tasks listed per page@GET
@Path(value="{taskId}/executions")
@Produces(value={"application/xml","application/json"})
PagedResult<TaskExecTO> listExecutions(@NotNull@PathParam(value="taskId")
Long taskId,
@NotNull@Min(value=1L)@QueryParam(value="page")@DefaultValue(value="1")
Integer page,
@NotNull@Min(value=1L)@QueryParam(value="size")@DefaultValue(value="25")
Integer size)
taskId - task to which executions belongpage - page number of executions in relation to page sizesize - number of executions listed per page@POST
@Consumes(value={"application/xml","application/json"})
<T extends SchedTaskTO> javax.ws.rs.core.Response create(@NotNull
T taskTO)
T - type of taskTOtaskTO - task to be created@PUT
@Path(value="{taskId}")
@Consumes(value={"application/xml","application/json"})
void update(@NotNull@PathParam(value="taskId")
Long taskId,
@NotNull
AbstractTaskTO taskTO)
taskId - id of task to be updatedtaskTO - updated task to be stored@DELETE
@Path(value="{taskId}")
void delete(@NotNull@PathParam(value="taskId")
Long taskId)
taskId - id of task to be deleted@DELETE
@Path(value="executions/{executionId}")
void deleteExecution(@NotNull@PathParam(value="executionId")
Long executionId)
executionId - id of task execution to be deleted@DELETE
@Path(value="{taskId}/executions")
@Produces(value={"application/xml","application/json"})
BulkActionResult deleteExecutions(@NotNull@PathParam(value="taskId")
Long taskId,
@QueryParam(value="startedBefore")
Date startedBefore,
@QueryParam(value="startedAfter")
Date startedAfter,
@QueryParam(value="endedBefore")
Date endedBefore,
@QueryParam(value="endedAfter")
Date endedAfter)
taskId - task to which executions belongstartedBefore - selects executions started before this timestampstartedAfter - selects executions started after this timestampendedBefore - selects executions ended before this timestampendedAfter - selects executions ended after this timestamp@POST
@Path(value="{taskId}/execute")
@Produces(value={"application/xml","application/json"})
TaskExecTO execute(@NotNull@PathParam(value="taskId")
Long taskId,
@QueryParam(value="dryRun")@DefaultValue(value="false")
boolean dryRun)
taskId - id of task to be executeddryRun - if true, task will only be simulated@POST
@Path(value="executions/{executionId}/report")
@Consumes(value={"application/xml","application/json"})
void report(@NotNull@PathParam(value="executionId")
Long executionId,
@NotNull
ReportExecTO reportExec)
executionId - id of task execution being reportedreportExec - execution being reported@POST
@Path(value="bulk")
@Produces(value={"application/xml","application/json"})
@Consumes(value={"application/xml","application/json"})
BulkActionResult bulk(@NotNull
BulkAction bulkAction)
bulkAction - list of task ids against which the bulk action will be performed.@GET
@Path(value="jobs")
@Produces(value={"application/xml","application/json"})
List<TaskExecTO> listJobs(@MatrixParam(value="type")
JobStatusType type)
type - of task jobCopyright © 2010–2018 The Apache Software Foundation. All rights reserved.