All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bonitasoft.web.client.api.UserTaskApi Maven / Gradle / Ivy

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 java.util.Map;

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.Contract;
import org.bonitasoft.web.client.model.UserTask;
import org.bonitasoft.web.client.model.UserTaskUpdateRequest;

import feign.*;

@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0")
public interface UserTaskApi extends ApiClient.Api {

    /**
     * Execute the UserTask
     * Execute the UserTask. In order to execute a task, the task contract values have to be provided.
     * 
     * @param id ID of the UserTask to execute (required)
     * @param body A JSON object matching task contract. Execute a task providing correct contract values. (required)
     * @param assign if true, assign the task to the current user and execute the task (optional)
     */
    @RequestLine("POST /API/bpm/userTask/{id}/execution?assign={assign}")
    @Headers({
            "Content-Type: application/json",
            "Accept: application/json",
    })
    void executeUserTask(@Param("id") String id, Map body, @Param("assign") Boolean assign);

    /**
     * Execute the UserTask
     * Similar to executeUserTask but it also returns the http response headers .
     * Execute the UserTask. In order to execute a task, the task contract values have to be provided.
     * 
     * @param id ID of the UserTask to execute (required)
     * @param body A JSON object matching task contract. Execute a task providing correct contract values. (required)
     * @param assign if true, assign the task to the current user and execute the task (optional)
     */
    @RequestLine("POST /API/bpm/userTask/{id}/execution?assign={assign}")
    @Headers({
            "Content-Type: application/json",
            "Accept: application/json",
    })
    ApiResponse executeUserTaskWithHttpInfo(@Param("id") String id, Map body,
            @Param("assign") Boolean assign);

    /**
     * Execute the UserTask
     * Execute the UserTask. In order to execute a task, the task contract values have to be provided.
     * Note, this is equivalent to the other executeUserTask 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 ExecuteUserTaskQueryParams} class that allows for
     * building up this map in a fluent style.
     * 
     * @param id ID of the UserTask to execute (required)
     * @param body A JSON object matching task contract. Execute a task providing correct contract values. (required)
     * @param queryParams Map of query parameters as name-value pairs
     *        

The following elements may be specified in the query map:

*
    *
  • assign - if true, assign the task to the current user and execute the task (optional)
  • *
*/ @RequestLine("POST /API/bpm/userTask/{id}/execution?assign={assign}") @Headers({ "Content-Type: application/json", "Accept: application/json", }) void executeUserTask(@Param("id") String id, Map body, @QueryMap(encoded = true) ExecuteUserTaskQueryParams queryParams); /** * Execute the UserTask * Execute the UserTask. In order to execute a task, the task contract values have to be provided. * Note, this is equivalent to the other executeUserTask that receives the query parameters as a map, * but this one also exposes the Http response headers * * @param id ID of the UserTask to execute (required) * @param body A JSON object matching task contract. Execute a task providing correct contract values. (required) * @param queryParams Map of query parameters as name-value pairs *

The following elements may be specified in the query map:

*
    *
  • assign - if true, assign the task to the current user and execute the task (optional)
  • *
*/ @RequestLine("POST /API/bpm/userTask/{id}/execution?assign={assign}") @Headers({ "Content-Type: application/json", "Accept: application/json", }) ApiResponse executeUserTaskWithHttpInfo(@Param("id") String id, Map body, @QueryMap(encoded = true) ExecuteUserTaskQueryParams queryParams); /** * A convenience class for generating query parameters for the * executeUserTask method in a fluent style. */ public static class ExecuteUserTaskQueryParams extends HashMap { public ExecuteUserTaskQueryParams assign(final Boolean value) { put("assign", EncodingUtils.encode(value)); return this; } } /** * Finds the Context by UserTask ID * Returns the Context for the given UserTask ID * * @param id ID of the UserTask that has the Context to return (required) * @return Map<String, Object> */ @RequestLine("GET /API/bpm/userTask/{id}/context") @Headers({ "Accept: application/json", }) Map getContextByUserTaskId(@Param("id") String id); /** * Finds the Context by UserTask ID * Similar to getContextByUserTaskId but it also returns the http response headers . * Returns the Context for the given UserTask ID * * @param id ID of the UserTask that has the Context to return (required) * @return A ApiResponse that wraps the response boyd and the http headers. */ @RequestLine("GET /API/bpm/userTask/{id}/context") @Headers({ "Accept: application/json", }) ApiResponse> getContextByUserTaskIdWithHttpInfo(@Param("id") String id); /** * Finds the Contract by UserTask ID * Returns the Contract for the given UserTask ID * * @param id ID of the UserTask that has the Contract to return (required) * @return Contract */ @RequestLine("GET /API/bpm/userTask/{id}/contract") @Headers({ "Accept: application/json", }) Contract getContractByUserTaskId(@Param("id") String id); /** * Finds the Contract by UserTask ID * Similar to getContractByUserTaskId but it also returns the http response headers . * Returns the Contract for the given UserTask ID * * @param id ID of the UserTask that has the Contract to return (required) * @return A ApiResponse that wraps the response boyd and the http headers. */ @RequestLine("GET /API/bpm/userTask/{id}/contract") @Headers({ "Accept: application/json", }) ApiResponse getContractByUserTaskIdWithHttpInfo(@Param("id") String id); /** * Finds the UserTask by ID * Returns the single UserTask for the given ID * * @param id ID of the UserTask to return (required) * @return UserTask */ @RequestLine("GET /API/bpm/userTask/{id}") @Headers({ "Accept: application/json", }) UserTask getUserTaskById(@Param("id") String id); /** * Finds the UserTask by ID * Similar to getUserTaskById but it also returns the http response headers . * Returns the single UserTask for the given ID * * @param id ID of the UserTask to return (required) * @return A ApiResponse that wraps the response boyd and the http headers. */ @RequestLine("GET /API/bpm/userTask/{id}") @Headers({ "Accept: application/json", }) ApiResponse getUserTaskByIdWithHttpInfo(@Param("id") String id); /** * Finds UserTasks * Finds UserTasks with pagination params and filters - can order on `id` - can search on `displayName` - can filter on * `displayName` * * @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<UserTask> */ @RequestLine("GET /API/bpm/userTask?p={p}&c={c}&f={f}&o={o}&s={s}") @Headers({ "Accept: application/json", }) List searchUserTasks(@Param("p") Integer p, @Param("c") Integer c, @Param("f") List f, @Param("o") String o, @Param("s") String s); /** * Finds UserTasks * Similar to searchUserTasks but it also returns the http response headers . * Finds UserTasks with pagination params and filters - can order on `id` - can search on `displayName` - can filter on * `displayName` * * @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/userTask?p={p}&c={c}&f={f}&o={o}&s={s}") @Headers({ "Accept: application/json", }) ApiResponse> searchUserTasksWithHttpInfo(@Param("p") Integer p, @Param("c") Integer c, @Param("f") List f, @Param("o") String o, @Param("s") String s); /** * Finds UserTasks * Finds UserTasks with pagination params and filters - can order on `id` - can search on `displayName` - can filter on * `displayName` * Note, this is equivalent to the other searchUserTasks 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 SearchUserTasksQueryParams} 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<UserTask> */ @RequestLine("GET /API/bpm/userTask?p={p}&c={c}&f={f}&o={o}&s={s}") @Headers({ "Accept: application/json", }) List searchUserTasks(@QueryMap(encoded = true) SearchUserTasksQueryParams queryParams); /** * Finds UserTasks * Finds UserTasks with pagination params and filters - can order on `id` - can search on `displayName` - can filter on * `displayName` * Note, this is equivalent to the other searchUserTasks 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<UserTask> */ @RequestLine("GET /API/bpm/userTask?p={p}&c={c}&f={f}&o={o}&s={s}") @Headers({ "Accept: application/json", }) ApiResponse> searchUserTasksWithHttpInfo( @QueryMap(encoded = true) SearchUserTasksQueryParams queryParams); /** * A convenience class for generating query parameters for the * searchUserTasks method in a fluent style. */ public static class SearchUserTasksQueryParams extends HashMap { public SearchUserTasksQueryParams p(final Integer value) { put("p", EncodingUtils.encode(value)); return this; } public SearchUserTasksQueryParams c(final Integer value) { put("c", EncodingUtils.encode(value)); return this; } public SearchUserTasksQueryParams f(final List value) { put("f", EncodingUtils.encodeCollection(value, "multi")); return this; } public SearchUserTasksQueryParams o(final String value) { put("o", EncodingUtils.encode(value)); return this; } public SearchUserTasksQueryParams s(final String value) { put("s", EncodingUtils.encode(value)); return this; } } /** * Update the UserTask by ID * Update the UserTask for the given ID. Fields that can be updated are `assigned_id` and `state`. The only value that can be set for the * state is `skipped`. You only need to specify the fields that are to be updated. * * @param id ID of the UserTask to return (required) * @param userTaskUpdateRequest Partial UserTask description (required) */ @RequestLine("PUT /API/bpm/userTask/{id}") @Headers({ "Content-Type: application/json", "Accept: application/json", }) void updateUserTaskById(@Param("id") String id, UserTaskUpdateRequest userTaskUpdateRequest); /** * Update the UserTask by ID * Similar to updateUserTaskById but it also returns the http response headers . * Update the UserTask for the given ID. Fields that can be updated are `assigned_id` and `state`. The only value that can be set for the * state is `skipped`. You only need to specify the fields that are to be updated. * * @param id ID of the UserTask to return (required) * @param userTaskUpdateRequest Partial UserTask description (required) */ @RequestLine("PUT /API/bpm/userTask/{id}") @Headers({ "Content-Type: application/json", "Accept: application/json", }) ApiResponse updateUserTaskByIdWithHttpInfo(@Param("id") String id, UserTaskUpdateRequest userTaskUpdateRequest); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy