Class TaskRestController
- java.lang.Object
-
- com.aquima.web.rest.v1.controller.RestControllerBase
-
- com.aquima.web.rest.v1.controller.TaskRestController
-
@ConditionalOnBean(com.blueriq.component.api.workunit.IWorkUnitExecutor.class) @ConditionalOnMissingBean(com.aquima.interactions.caseengine.client.CaseEngineClient.class) @RestController @RestApiContext @RequestMapping(value="/tasks", produces="application/json") public class TaskRestController extends RestControllerBase
Responsible for handling task specific requests- Since:
- 9.6
- Author:
- Marius Orsan
-
-
Field Summary
Fields Modifier and Type Field Description static String
MAPPING
static String
NAME
-
Fields inherited from class com.aquima.web.rest.v1.controller.RestControllerBase
DEFAULT_PAGE_NUMBER, DEFAULT_PAGE_SIZE
-
-
Constructor Summary
Constructors Constructor Description TaskRestController(com.aquima.interactions.process.dao.IProcessCaseDao dao, com.aquima.interactions.portal.IPortalEngine portalEngine, com.blueriq.component.api.workunit.IWorkUnitExecutor executor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>
getCustomFields(long taskId)
This method returns the customFields of a taskTask
getTask(long taskId, String attributes, String customFields)
This method returns a task with the specified taskIdPagedTasks
getTasks(org.springframework.web.context.request.WebRequest request, Integer page, Integer pageSize, String sort, String attributes, String customFields)
This method returns a list of tasksorg.springframework.http.ResponseEntity<Task>
updateTask(long taskId, Task task)
This method updates a task-
Methods inherited from class com.aquima.web.rest.v1.controller.RestControllerBase
getFilters, getUser
-
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
MAPPING
public static final String MAPPING
- See Also:
- Constant Field Values
-
-
Method Detail
-
getTasks
@RequestMapping(method=GET) @ResponseStatus(OK) @ResponseBody public PagedTasks getTasks(org.springframework.web.context.request.WebRequest request, @RequestParam(required=false) Integer page, @RequestParam(required=false) Integer pageSize, @RequestParam(required=false) String sort, @RequestParam(required=false) String attributes, @RequestParam(required=false) String customFields)
This method returns a list of tasks- Parameters:
page
- The page number. Not required.pageSize
- The items per page. Not required.sort
- The properties to sort on. Comma separated. Not required.attributes
- The case attributes to include. Comma separated. Not requiredcustomFields
- The custom fields to include. Comma separated. Not required- Returns:
- The list of paged tasks
-
getTask
@RequestMapping(value="/{taskId}", method=GET) @ResponseStatus(OK) @ResponseBody public Task getTask(@PathVariable("taskId") long taskId, @RequestParam(required=false) String attributes, @RequestParam(required=false) String customFields)
This method returns a task with the specified taskId- Parameters:
taskId
- The id of the taskattributes
- The case attributes to include. Comma separated. Not requiredcustomFields
- The custom fields to include. Comma separated. Not required- Returns:
- A task resource
-
updateTask
@RequestMapping(value="/{taskId}", method=PUT, consumes="application/json") @ResponseStatus(OK) @ResponseBody public org.springframework.http.ResponseEntity<Task> updateTask(@PathVariable("taskId") long taskId, @RequestBody Task task)
This method updates a task- Parameters:
taskId
- The id of the tasktask
-Task
resource to be updated- Returns:
- The updated task resource
-
getCustomFields
@RequestMapping(value="/{taskId}/customFields", method=GET) @ResponseStatus(OK) @ResponseBody public Map<String,String> getCustomFields(@PathVariable("taskId") long taskId)
This method returns the customFields of a task- Parameters:
taskId
- The id of the task- Returns:
- A Map with customFields values
-
-