org.bonitasoft.web.client.api.ManualTaskApi Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bonita-java-client Show documentation
Show all versions of bonita-java-client Show documentation
Java client for Bonita REST API
The newest version!
/**
* Copyright (C) 2024 BonitaSoft S.A.
* BonitaSoft, 32 rue Gustave Eiffel - 38000 Grenoble
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2.0 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
package org.bonitasoft.web.client.api;
import java.util.HashMap;
import java.util.List;
import org.bonitasoft.web.client.invoker.ApiClient;
import org.bonitasoft.web.client.invoker.EncodingUtils;
import org.bonitasoft.web.client.model.ApiResponse;
import org.bonitasoft.web.client.model.ManualTask;
import org.bonitasoft.web.client.model.ManualTaskCreateRequest;
import org.bonitasoft.web.client.model.ManualTaskUpdateRequest;
import feign.*;
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0")
public interface ManualTaskApi extends ApiClient.Api {
/**
* Create the ManualTask
* Create the ManualTask. Use a POST method to create a new subtask. A subtask is attached to a parent task and it needs to be immediately assigned to a user.
*
* @param body Partial ManualTask description (required)
* @return ManualTask
*/
@RequestLine("POST /API/bpm/manualTask")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
ManualTask createManualTask(ManualTaskCreateRequest body);
/**
* Create the ManualTask
* Similar to createManualTask
but it also returns the http response headers .
* Create the ManualTask. Use a POST method to create a new subtask. A subtask is attached to a parent task and it needs to be immediately assigned to a user.
*
* @param body Partial ManualTask description (required)
* @return A ApiResponse that wraps the response boyd and the http headers.
*/
@RequestLine("POST /API/bpm/manualTask")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
ApiResponse createManualTaskWithHttpInfo(ManualTaskCreateRequest body);
/**
* Finds the ManualTask by ID
* Returns the single ManualTask for the given ID
*
* @param id ID of the ManualTask to return (required)
* @return ManualTask
*/
@RequestLine("GET /API/bpm/manualTask/{id}")
@Headers({
"Accept: application/json",
})
ManualTask getManualTaskById(@Param("id") String id);
/**
* Finds the ManualTask by ID
* Similar to getManualTaskById
but it also returns the http response headers .
* Returns the single ManualTask for the given ID
*
* @param id ID of the ManualTask to return (required)
* @return A ApiResponse that wraps the response boyd and the http headers.
*/
@RequestLine("GET /API/bpm/manualTask/{id}")
@Headers({
"Accept: application/json",
})
ApiResponse getManualTaskByIdWithHttpInfo(@Param("id") String id);
/**
* Finds ManualTasks
* Finds ManualTasks with pagination params and filters You can filter on: * `assigned_id={user_id}`: retrieve only the manual tasks assigned to
* the specified user. For example, retrieve the manual tasks assigned to user with id 1:
* `/API/bpm/manualTask?p=0&c=10&f=assigned_id%3d1`. * `state=skipped | ready | completed | failed` : retrieve
* only the manual tasks with the specified state. For example, retrieve the ready tasks:
* `/API/bpm/manualTask?p=0&c=10&f=state%3dready`. * `caseId={case_id}`: retrieve only the manual tasks created
* in the specified process instances. For example, retrieve the manual tasks for the case\\_id 2:
* `/API/bpm/manualTask?p=0&c=10&f=caseId%3d2`. * `parentTaskId={parentTask_id}`: retrieve only the manual tasks
* for a specific parentTask. For example, retrieve the manual tasks for the parentTask\\_id 40001:
* `/API/bpm/manualTask?p=0&c=10&f=parentTaskId%3d40001`. You can search on: * name: search all manual tasks with a name that
* starts with the search string. For example, search for all manual tasks that have a name that starts with MySubTask:
* `/API/bpm/manualTask?p=0&c=10&s=MySubTask`.
*
* @param p index of the page to display (required)
* @param c maximum number of elements to retrieve (required)
* @param f can filter on attributes with the format f={filter\\_name}={filter\\_value} with the name/value pair as url encoded string. (optional)
* @param o can order on attributes (optional)
* @param s can search on attributes (optional)
* @return List<ManualTask>
*/
@RequestLine("GET /API/bpm/manualTask?p={p}&c={c}&f={f}&o={o}&s={s}")
@Headers({
"Accept: application/json",
})
List searchManualTasks(@Param("p") Integer p, @Param("c") Integer c, @Param("f") List f,
@Param("o") String o, @Param("s") String s);
/**
* Finds ManualTasks
* Similar to searchManualTasks
but it also returns the http response headers .
* Finds ManualTasks with pagination params and filters You can filter on: * `assigned_id={user_id}`: retrieve only the manual tasks assigned to
* the specified user. For example, retrieve the manual tasks assigned to user with id 1:
* `/API/bpm/manualTask?p=0&c=10&f=assigned_id%3d1`. * `state=skipped | ready | completed | failed` : retrieve
* only the manual tasks with the specified state. For example, retrieve the ready tasks:
* `/API/bpm/manualTask?p=0&c=10&f=state%3dready`. * `caseId={case_id}`: retrieve only the manual tasks created
* in the specified process instances. For example, retrieve the manual tasks for the case\\_id 2:
* `/API/bpm/manualTask?p=0&c=10&f=caseId%3d2`. * `parentTaskId={parentTask_id}`: retrieve only the manual tasks
* for a specific parentTask. For example, retrieve the manual tasks for the parentTask\\_id 40001:
* `/API/bpm/manualTask?p=0&c=10&f=parentTaskId%3d40001`. You can search on: * name: search all manual tasks with a name that
* starts with the search string. For example, search for all manual tasks that have a name that starts with MySubTask:
* `/API/bpm/manualTask?p=0&c=10&s=MySubTask`.
*
* @param p index of the page to display (required)
* @param c maximum number of elements to retrieve (required)
* @param f can filter on attributes with the format f={filter\\_name}={filter\\_value} with the name/value pair as url encoded string. (optional)
* @param o can order on attributes (optional)
* @param s can search on attributes (optional)
* @return A ApiResponse that wraps the response boyd and the http headers.
*/
@RequestLine("GET /API/bpm/manualTask?p={p}&c={c}&f={f}&o={o}&s={s}")
@Headers({
"Accept: application/json",
})
ApiResponse> searchManualTasksWithHttpInfo(@Param("p") Integer p, @Param("c") Integer c,
@Param("f") List f, @Param("o") String o, @Param("s") String s);
/**
* Finds ManualTasks
* Finds ManualTasks with pagination params and filters You can filter on: * `assigned_id={user_id}`: retrieve only the manual tasks assigned to
* the specified user. For example, retrieve the manual tasks assigned to user with id 1:
* `/API/bpm/manualTask?p=0&c=10&f=assigned_id%3d1`. * `state=skipped | ready | completed | failed` : retrieve
* only the manual tasks with the specified state. For example, retrieve the ready tasks:
* `/API/bpm/manualTask?p=0&c=10&f=state%3dready`. * `caseId={case_id}`: retrieve only the manual tasks created
* in the specified process instances. For example, retrieve the manual tasks for the case\\_id 2:
* `/API/bpm/manualTask?p=0&c=10&f=caseId%3d2`. * `parentTaskId={parentTask_id}`: retrieve only the manual tasks
* for a specific parentTask. For example, retrieve the manual tasks for the parentTask\\_id 40001:
* `/API/bpm/manualTask?p=0&c=10&f=parentTaskId%3d40001`. You can search on: * name: search all manual tasks with a name that
* starts with the search string. For example, search for all manual tasks that have a name that starts with MySubTask:
* `/API/bpm/manualTask?p=0&c=10&s=MySubTask`.
* Note, this is equivalent to the other searchManualTasks
method,
* but with the query parameters collected into a single Map parameter. This
* is convenient for services with optional query parameters, especially when
* used with the {@link SearchManualTasksQueryParams} class that allows for
* building up this map in a fluent style.
*
* @param queryParams Map of query parameters as name-value pairs
* The following elements may be specified in the query map:
*
* - p - index of the page to display (required)
* - c - maximum number of elements to retrieve (required)
* - f - can filter on attributes with the format f={filter\\_name}={filter\\_value} with the name/value pair as url encoded string.
* (optional)
* - o - can order on attributes (optional)
* - s - can search on attributes (optional)
*
* @return List<ManualTask>
*/
@RequestLine("GET /API/bpm/manualTask?p={p}&c={c}&f={f}&o={o}&s={s}")
@Headers({
"Accept: application/json",
})
List searchManualTasks(@QueryMap(encoded = true) SearchManualTasksQueryParams queryParams);
/**
* Finds ManualTasks
* Finds ManualTasks with pagination params and filters You can filter on: * `assigned_id={user_id}`: retrieve only the manual tasks assigned to
* the specified user. For example, retrieve the manual tasks assigned to user with id 1:
* `/API/bpm/manualTask?p=0&c=10&f=assigned_id%3d1`. * `state=skipped | ready | completed | failed` : retrieve
* only the manual tasks with the specified state. For example, retrieve the ready tasks:
* `/API/bpm/manualTask?p=0&c=10&f=state%3dready`. * `caseId={case_id}`: retrieve only the manual tasks created
* in the specified process instances. For example, retrieve the manual tasks for the case\\_id 2:
* `/API/bpm/manualTask?p=0&c=10&f=caseId%3d2`. * `parentTaskId={parentTask_id}`: retrieve only the manual tasks
* for a specific parentTask. For example, retrieve the manual tasks for the parentTask\\_id 40001:
* `/API/bpm/manualTask?p=0&c=10&f=parentTaskId%3d40001`. You can search on: * name: search all manual tasks with a name that
* starts with the search string. For example, search for all manual tasks that have a name that starts with MySubTask:
* `/API/bpm/manualTask?p=0&c=10&s=MySubTask`.
* Note, this is equivalent to the other searchManualTasks
that receives the query parameters as a map,
* but this one also exposes the Http response headers
*
* @param queryParams Map of query parameters as name-value pairs
* The following elements may be specified in the query map:
*
* - p - index of the page to display (required)
* - c - maximum number of elements to retrieve (required)
* - f - can filter on attributes with the format f={filter\\_name}={filter\\_value} with the name/value pair as url encoded string.
* (optional)
* - o - can order on attributes (optional)
* - s - can search on attributes (optional)
*
* @return List<ManualTask>
*/
@RequestLine("GET /API/bpm/manualTask?p={p}&c={c}&f={f}&o={o}&s={s}")
@Headers({
"Accept: application/json",
})
ApiResponse> searchManualTasksWithHttpInfo(
@QueryMap(encoded = true) SearchManualTasksQueryParams queryParams);
/**
* A convenience class for generating query parameters for the
* searchManualTasks
method in a fluent style.
*/
public static class SearchManualTasksQueryParams extends HashMap {
public SearchManualTasksQueryParams p(final Integer value) {
put("p", EncodingUtils.encode(value));
return this;
}
public SearchManualTasksQueryParams c(final Integer value) {
put("c", EncodingUtils.encode(value));
return this;
}
public SearchManualTasksQueryParams f(final List value) {
put("f", EncodingUtils.encodeCollection(value, "multi"));
return this;
}
public SearchManualTasksQueryParams o(final String value) {
put("o", EncodingUtils.encode(value));
return this;
}
public SearchManualTasksQueryParams s(final String value) {
put("s", EncodingUtils.encode(value));
return this;
}
}
/**
* Update the ManualTask by ID
* Update the ManualTask for the given ID. Use a PUT method to execute a subtask. Executing a subtask basically means changing its state to completed and
* providing an executedBy value.
*
* @param id ID of the ManualTask to return (required)
* @param manualTaskUpdateRequest Partial ManualTask description (required)
*/
@RequestLine("PUT /API/bpm/manualTask/{id}")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
void updateManualTaskById(@Param("id") String id, ManualTaskUpdateRequest manualTaskUpdateRequest);
/**
* Update the ManualTask by ID
* Similar to updateManualTaskById
but it also returns the http response headers .
* Update the ManualTask for the given ID. Use a PUT method to execute a subtask. Executing a subtask basically means changing its state to completed and
* providing an executedBy value.
*
* @param id ID of the ManualTask to return (required)
* @param manualTaskUpdateRequest Partial ManualTask description (required)
*/
@RequestLine("PUT /API/bpm/manualTask/{id}")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
ApiResponse updateManualTaskByIdWithHttpInfo(@Param("id") String id,
ManualTaskUpdateRequest manualTaskUpdateRequest);
}