diff --git a/common/taskana-common-data/src/main/resources/sql/sample-data/task.sql b/common/taskana-common-data/src/main/resources/sql/sample-data/task.sql index 62408eab84..45edf2d300 100644 --- a/common/taskana-common-data/src/main/resources/sql/sample-data/task.sql +++ b/common/taskana-common-data/src/main/resources/sql/sample-data/task.sql @@ -4,7 +4,7 @@ INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000000', 'ETI:000000000000000000000000000000000000', RELATIVE_DATE(-1) , RELATIVE_DATE(0) , null , RELATIVE_DATE(0) , RELATIVE_DATE(0) , RELATIVE_DATE(-1) , RELATIVE_DATE(0) , 'Task99' , 'creator_user_id' , 'Lorem ipsum was n Quatsch dolor sit amet.', 'Some custom Note' , 1 , -1 , 'CLAIMED' , 'MANUAL' , 'T2000' , 'CLI:100000000000000000000000000000000016', 'WBI:100000000000000000000000000000000006' , 'USER-1-1' , 'DOMAIN_A', 'BPI21' , 'PBPI21' , 'user-1-1' , 'MyCompany1', 'MySystem1', 'MyInstance1' , 'MyType1', 'MyValue1' , true , false , null , 'NONE' , null , 'custom1' , 'custom2' , 'custom3' , 'custom4' , 'custom5' , 'custom6' , 'custom7' , 'custom8' , 'custom9' , 'custom10' , 'custom11' , 'custom12' , 'custom13' , 'abc' , 'custom15' , 'custom16' , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ); INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000001', 'ETI:000000000000000000000000000000000001', RELATIVE_DATE(-2) , RELATIVE_DATE(0) , null , RELATIVE_DATE(0) , null , RELATIVE_DATE(-2) , RELATIVE_DATE(0) , 'Task01' , 'creator_user_id' , 'Lorem ipsum was n Quatsch dolor sit amet.', 'Some custom Note' , 2 , -1 , 'CLAIMED' , 'EXTERN' , 'L110102' , 'CLI:100000000000000000000000000000000005', 'WBI:100000000000000000000000000000000006' , 'USER-1-1' , 'DOMAIN_A', 'BPI21' , 'PBPI21' , 'user-1-1' , 'MyCompany1', 'MySystem1', 'MyInstance1' , 'MyType1', 'MyValue1' , true , false , null , 'NONE' , null , 'pqr' , null , null , null , null , null , null , null , null , null , null , null , null , 'abc' , null , null , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ); INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000002', 'ETI:000000000000000000000000000000000002', RELATIVE_DATE(-2) , RELATIVE_DATE(0) , null , RELATIVE_DATE(0) , RELATIVE_DATE(0) , RELATIVE_DATE(-2) , RELATIVE_DATE(0) , 'Task02' , 'creator_user_id' , 'Lorem ipsum was n Quatsch t. Aber stimmt.', 'Some custom Note' , 2 , -1 , 'CLAIMED' , 'MANUAL' , 'T2000' , 'CLI:100000000000000000000000000000000016', 'WBI:100000000000000000000000000000000006' , 'USER-1-1' , 'DOMAIN_A', 'BPI21' , 'PBPI21' , 'user-1-1' , 'MyCompany1', 'MySystem1', 'MyInstance1' , 'MyType1', 'MyValue1' , true , false , null , 'NONE' , null , null , null , null , null , null , null , null , null , null , null , null , null , null , 'abc' , null , null , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ); -INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000003', 'ETI:000000000000000000000000000000000003', RELATIVE_DATE(-2) , null , null , RELATIVE_DATE(0) , RELATIVE_DATE(0) , RELATIVE_DATE(-2) , RELATIVE_DATE(0) , 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , -1 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000003' , 'DOC_0000000000000000003' , null , '00' , 'PASystem' , '00' , 'VNR' , '11223344' , false , false , null , 'NONE' , null , 'efg' , null , null , null , null , null , null , null , null , null , null , null , null , 'abc' , null , null , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ); +INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000003', 'ETI:000000000000000000000000000000000003','2018-02-01 12:00:00', null , null , '2018-02-01 12:00:00', RELATIVE_DATE(0) , RELATIVE_DATE(-2) , RELATIVE_DATE(0) , 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , -1 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000003' , 'DOC_0000000000000000003' , null , '00' , 'PASystem' , '00' , 'VNR' , '11223344' , false , false , null , 'NONE' , null , 'efg' , null , null , null , null , null , null , null , null , null , null , null , null , 'abc' , null , null , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ); INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000004', 'ETI:000000000000000000000000000000000004', RELATIVE_DATE(-3) , null , null , RELATIVE_DATE(0) , RELATIVE_DATE(0) , RELATIVE_DATE(-3) , RELATIVE_DATE(0) , 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , -1 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000004' , 'DOC_0000000000000000004' , null , '00' , 'PASystem' , '00' , 'VNR' , '11223344' , false , false , null , 'NONE' , null , null , 'ade' , null , null , null , '074' , '' , null , null , null , null , null , null , 'abc' , null , null , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ); INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000005', 'ETI:000000000000000000000000000000000005', RELATIVE_DATE(-4) , null , null , RELATIVE_DATE(0) , RELATIVE_DATE(-3) , RELATIVE_DATE(-4) , RELATIVE_DATE(0) , 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , -1 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000005' , 'DOC_0000000000000000005' , null , '00' , 'PASystem' , '00' , 'VNR' , '11223344' , false , false , null , 'NONE' , null , null , null , null , null , null , '074' , '' , null , null , null , null , null , null , 'abc' , null , null , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ); INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000006', 'ETI:000000000000000000000000000000000006', RELATIVE_DATE(-5) , null , null , RELATIVE_DATE(0) , RELATIVE_DATE(-3) , RELATIVE_DATE(-5) , RELATIVE_DATE(0) , 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2000 , -1 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000006' , 'DOC_0000000000000000006' , null , '00' , 'PASystem' , '00' , 'VNR' , '11223344' , false , false , null , 'NONE' , null , null , null , null , null , null , '075' , '' , null , null , null , null , null , null , 'abc' , null , null , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ); diff --git a/pom.xml b/pom.xml index 8772532c7d..bb67f67e7f 100644 --- a/pom.xml +++ b/pom.xml @@ -89,6 +89,7 @@ 0.8.11 3.0.1 2.0.11 + 2.5.0 1.19.7 diff --git a/rest/taskana-rest-spring-example-boot/pom.xml b/rest/taskana-rest-spring-example-boot/pom.xml index 5855d282e6..36c02cd685 100644 --- a/rest/taskana-rest-spring-example-boot/pom.xml +++ b/rest/taskana-rest-spring-example-boot/pom.xml @@ -50,6 +50,11 @@ taskana-rest-spring-example-common ${project.version} + + org.springdoc + springdoc-openapi-starter-webmvc-ui + ${version.spring-openapi} + diff --git a/rest/taskana-rest-spring-example-boot/src/main/java/pro/taskana/example/boot/OpenApiConfiguration.java b/rest/taskana-rest-spring-example-boot/src/main/java/pro/taskana/example/boot/OpenApiConfiguration.java new file mode 100644 index 0000000000..be05c02d3d --- /dev/null +++ b/rest/taskana-rest-spring-example-boot/src/main/java/pro/taskana/example/boot/OpenApiConfiguration.java @@ -0,0 +1,335 @@ +package pro.taskana.example.boot; + +import io.swagger.v3.oas.annotations.OpenAPIDefinition; +import io.swagger.v3.oas.annotations.info.Info; + +@OpenAPIDefinition( + info = + @Info( + title = "TASKANA RESTful API Documentation", + version = "8.2.0", + description = + "" + + "

Overview

" + + "

" + + "This is the REST documentation for [TASKANA](http://taskana.pro) - the " + + "world’s first open source solution for Enterprise Task Management." + + "

" + + "

" + + "**For all Query Parameters:**
Whenever a parameter is an array type," + + " several values can be passed by declaring that parameter multiple times." + + "

" + + "

" + + "Whenever a parameter is a complex type, the attributes of the value-object" + + " can be passed as a json. For example, a complex parameter with the name " + + "\"complex-query-param\" and attributes \"attribute1\" and \"attribute2\" " + + "would be specified in the following way:complex-query-param={\"attribute1\"" + + ":\"value1\",\"attribute2\":\"value2\"}" + + "

" + + "

" + + "Whenever a parameter is a value-less type (e.g owner-is-null and " + + "current-user) it is expected to be defined without a value, i.e., it should" + + " be specified as ?parameter and not ?parameter= or ?parameter=someValue" + + "

" + + "

Hypermedia Support

" + + "

" + + "NOTE: HATEOAS support is still in development.Please have a look at " + + "example responses for each resource to determine the available links." + + "

" + + "

" + + "TASKANA uses the [HATEOAS](https://restfulapi.net/hateoas/) (Hypermedia" + + " as the Engine of Application State) REST constraint. Most of our resources" + + " contain a _links section which contains navigation links. Besides, helping" + + " to navigate through our REST API, the navigation links also encapsulate the" + + " API. Using HATEOAS allows us to change some endpoints without modifying " + + "your frontend." + + "

" + + "

Errors

" + + "

" + + "In order to support multilingual websites, TASKANA uses error codes to " + + "define which error occurred. Additionally, an optional set of message " + + "variables, containing some technical information, is added, so that the " + + "website can describe the error with all details." + + "

" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "
Status CodeKeyMessage Variables
**400 BAD_REQUEST**CLASSIFICATION_SERVICE_LEVEL_MALFORMEDserviceLevel, classificationKey, domain
**400 BAD_REQUEST**CUSTOM_HOLIDAY_WRONG_FORMATcustomHoliday
**400 BAD_REQUEST**DOMAIN_NOT_FOUNDdomain
**400 BAD_REQUEST**INVALID_ARGUMENT
**400 BAD_REQUEST**QUERY_PARAMETER_MALFORMEDmalformedQueryParameters
**400 BAD_REQUEST**TASK_INVALID_CALLBACK_STATEtaskId, taskCallbackState, requiredCallbackStates
**400 BAD_REQUEST**TASK_INVALID_OWNERtaskId, currentUserId
**400 BAD_REQUEST**TASK_INVALID_STATEtaskId, taskState, requiredTaskStates
**403 FORBIDDEN**NOT_AUTHORIZEDroles, currentUserId
**403 FORBIDDEN**NOT_AUTHORIZED_ON_TASK_COMMENTcurrentUserId, taskCommentId
**403 FORBIDDEN**NOT_AUTHORIZED_ON_WORKBASKET_WITH_IDcurrentUserId, workbasketId, requiredPermissions
**403 FORBIDDEN**NOT_AUTHORIZED_ON_WORKBASKET_WITH_KEY_AND_DOMAINcurrentUserId, workbasketKey, domain, requiredPermissions
**404 NOT_FOUND**CLASSIFICATION_WITH_ID_NOT_FOUNDclassificationId
**404 NOT_FOUND**CLASSIFICATION_WITH_KEY_NOT_FOUNDclassificationKey, domain
**404 NOT_FOUND**TASK_COMMENT_NOT_FOUNDtaskCommentId
**404 NOT_FOUND**TASK_NOT_FOUNDtaskId
**404 NOT_FOUND**USER_NOT_FOUNDuserId
**404 NOT_FOUND**WORKBASKET_WITH_ID_NOT_FOUNDworkbasketId
**404 NOT_FOUND**WORKBASKET_WITH_KEY_NOT_FOUNDworkbasketKey, domain
**409 CONFLICT**ATTACHMENT_ALREADY_EXISTSattachmentId, taskId
**409 CONFLICT**CLASSIFICATION_ALREADY_EXISTSclassificationKey, domain
**409 CONFLICT**ENTITY_NOT_UP_TO_DATEentityId
**409 CONFLICT**TASK_ALREADY_EXISTSexternalTaskId
**409 CONFLICT**USER_ALREADY_EXISTSuserID
**409 CONFLICT**WORKBASKET_ACCESS_ITEM_ALREADY_EXISTSaccessId, workbasketId
**409 CONFLICT**WORKBASKET_ALREADY_EXISTSworkbasketKey, domain
**409 CONFLICT**WORKBASKET_MARKED_FOR_DELETIONworkbasketId
**413 PAYLOAD_TOO_LARGE**PAYLOAD_TOO_LARGE
**423 LOCKED**CLASSIFICATION_IN_USEclassificationKey, domain
**423 LOCKED**WORKBASKET_IN_USEworkbasketId
**500 INTERNAL_SERVER_ERROR**CONNECTION_AUTOCOMMIT_FAILED
**500 INTERNAL_SERVER_ERROR**CONNECTION_NOT_SET
**500 INTERNAL_SERVER_ERROR**CRITICAL_SYSTEM_ERROR
**500 INTERNAL_SERVER_ERROR**DATABASE_UNSUPPORTEDdatabaseProductName
**500 INTERNAL_SERVER_ERROR**UNKNOWN_ERROR
" + + "

Errors

" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "
KeyType
accessIdString
attachmentIdString
classificationIdString
classificationKeyString
currentUserIdString
customHolidayString
databaseProductNameString
domainString
externalTaskIdString
historyEventIdString
malformedQueryParametersMalformedQueryParameter[]
requiredCallbackStatesCallbackState[]
requiredPermissionsWorkbasketPermission[]
requiredTaskStatesTaskState[]
rolesTaskanaRole[]
taskCallbackStateCallbackState
taskCommentIdString
taskIdString
taskStateTaskState
workbasketIdString
workbasketKeyString
")) +class OpenApiConfiguration {} diff --git a/rest/taskana-rest-spring-example-boot/src/main/java/pro/taskana/example/boot/security/BootWebSecurityConfigurer.java b/rest/taskana-rest-spring-example-boot/src/main/java/pro/taskana/example/boot/security/BootWebSecurityConfigurer.java index d98ae8dd99..c1d0c8d5a5 100644 --- a/rest/taskana-rest-spring-example-boot/src/main/java/pro/taskana/example/boot/security/BootWebSecurityConfigurer.java +++ b/rest/taskana-rest-spring-example-boot/src/main/java/pro/taskana/example/boot/security/BootWebSecurityConfigurer.java @@ -66,7 +66,8 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { authorizeHttpRequests .requestMatchers("/css/**", "/img/**") .permitAll() - .requestMatchers(HttpMethod.GET, "/docs/**") + .requestMatchers( + HttpMethod.GET, "/docs/**", "/api-docs*") .permitAll()) .cors(Customizer.withDefaults()) .addFilter(jaasApiIntegrationFilter()) diff --git a/rest/taskana-rest-spring-example-boot/src/main/resources/application.properties b/rest/taskana-rest-spring-example-boot/src/main/resources/application.properties index a367722476..a961f5487d 100644 --- a/rest/taskana-rest-spring-example-boot/src/main/resources/application.properties +++ b/rest/taskana-rest-spring-example-boot/src/main/resources/application.properties @@ -7,6 +7,7 @@ taskana.routing.dmn.upload.path=/tmp/routing.dmn spring.datasource.url=jdbc:h2:mem:taskana;NON_KEYWORDS=KEY,VALUE;IGNORECASE=TRUE;DB_CLOSE_ON_EXIT=FALSE;LOCK_MODE=0 spring.datasource.driverClassName=org.h2.Driver spring.datasource.username=sa +springdoc.api-docs.path=/api-docs spring.datasource.password=sa taskana.schemaName=TASKANA ######## h2 console configuration ######## diff --git a/rest/taskana-rest-spring/pom.xml b/rest/taskana-rest-spring/pom.xml index 5c29971fa9..7594e3722d 100644 --- a/rest/taskana-rest-spring/pom.xml +++ b/rest/taskana-rest-spring/pom.xml @@ -78,7 +78,11 @@ org.springframework.boot spring-boot-autoconfigure - + + org.springdoc + springdoc-openapi-starter-webmvc-ui + ${version.spring-openapi} + pro.taskana diff --git a/rest/taskana-rest-spring/src/main/java/pro/taskana/common/rest/QueryPagingParameter.java b/rest/taskana-rest-spring/src/main/java/pro/taskana/common/rest/QueryPagingParameter.java index 1d6b1a299e..03a0ff56c7 100644 --- a/rest/taskana-rest-spring/src/main/java/pro/taskana/common/rest/QueryPagingParameter.java +++ b/rest/taskana-rest-spring/src/main/java/pro/taskana/common/rest/QueryPagingParameter.java @@ -2,6 +2,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.Min; import java.beans.ConstructorProperties; import java.util.List; @@ -11,12 +12,26 @@ public class QueryPagingParameter> implements QueryParameter> { + public Integer getPage() { + return page; + } + + public Integer getPageSize() { + return pageSize; + } + /** Request a specific page. Requires the definition of the 'page-size'. */ + @Schema( + name = "page", + description = "Request a specific page. Requires the definition of the 'page-size'.") @JsonProperty("page") @Min(1) private final Integer page; /** Defines the size for each page. This requires a specific requested 'page'. */ + @Schema( + name = "page-size", + description = "Defines the size for each page. This requires a specific requested 'page'.") @JsonProperty("page-size") @Min(1) private final Integer pageSize; diff --git a/rest/taskana-rest-spring/src/main/java/pro/taskana/common/rest/QuerySortParameter.java b/rest/taskana-rest-spring/src/main/java/pro/taskana/common/rest/QuerySortParameter.java index 76aa1aed6d..318dcc40d9 100644 --- a/rest/taskana-rest-spring/src/main/java/pro/taskana/common/rest/QuerySortParameter.java +++ b/rest/taskana-rest-spring/src/main/java/pro/taskana/common/rest/QuerySortParameter.java @@ -1,6 +1,7 @@ package pro.taskana.common.rest; import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.util.List; import pro.taskana.common.api.BaseQuery; import pro.taskana.common.api.BaseQuery.SortDirection; @@ -12,6 +13,11 @@ public class QuerySortParameter, S extends QuerySortBy // the javadoc comment for this field is above its getter. This is done to define the type // parameter S by overriding that getter and allowing spring-auto-rest-docs to properly detect // the type parameter S. + @Schema( + name = "sort-by", + description = + "Sort the result by a given field. Multiple sort values can be declared. When the " + + "primary sort value is the same, the second one will be used.") @JsonProperty("sort-by") private final List sortBy; @@ -20,6 +26,13 @@ public class QuerySortParameter, S extends QuerySortBy * of sort-by and order declarations have to match. Alternatively the value can be omitted. If * done so the default sort order (ASCENDING) will be applied to every sort-by value. */ + @Schema( + name = "order", + description = + "The order direction for each sort value. This value requires the use of 'sort-by'. The" + + " amount of sort-by and order declarations have to match. Alternatively the value" + + " can be omitted. If done so the default sort order (ASCENDING) will be applied to" + + " every sort-by value.") @JsonProperty("order") private final List order; diff --git a/rest/taskana-rest-spring/src/main/java/pro/taskana/common/rest/models/PageMetadata.java b/rest/taskana-rest-spring/src/main/java/pro/taskana/common/rest/models/PageMetadata.java index e36968d3dd..b0052cac64 100644 --- a/rest/taskana-rest-spring/src/main/java/pro/taskana/common/rest/models/PageMetadata.java +++ b/rest/taskana-rest-spring/src/main/java/pro/taskana/common/rest/models/PageMetadata.java @@ -1,5 +1,7 @@ package pro.taskana.common.rest.models; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; import java.beans.ConstructorProperties; import java.util.Objects; @@ -11,12 +13,23 @@ public class PageMetadata { /** The element size of the page. */ + @Parameter(hidden = true) + @Schema(name = "size", description = "The element size of the page.") private final long size; + /** The total number of elements available. */ + @Parameter(hidden = true) + @Schema(name = "totalElements", description = "The total number of elements available.") private final long totalElements; + /** Amount of pages that are available in total. */ + @Parameter(hidden = true) + @Schema(name = "totalPages", description = "Amount of pages that are available in total.") private final long totalPages; + /** The current page number. */ + @Parameter(hidden = true) + @Schema(name = "number", description = "The current page number.") private final long number; @ConstructorProperties({"size", "totalElements", "totalPages", "number"}) diff --git a/rest/taskana-rest-spring/src/main/java/pro/taskana/task/rest/TaskController.java b/rest/taskana-rest-spring/src/main/java/pro/taskana/task/rest/TaskController.java index 69aa22f24c..bc08c232f0 100644 --- a/rest/taskana-rest-spring/src/main/java/pro/taskana/task/rest/TaskController.java +++ b/rest/taskana-rest-spring/src/main/java/pro/taskana/task/rest/TaskController.java @@ -2,6 +2,12 @@ import static java.util.function.Predicate.not; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.ExampleObject; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; import jakarta.servlet.http.HttpServletRequest; import java.beans.ConstructorProperties; import java.util.HashSet; @@ -10,7 +16,9 @@ import java.util.Optional; import java.util.Set; import java.util.function.BiConsumer; +import org.springdoc.core.annotations.ParameterObject; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.hateoas.MediaTypes; import org.springframework.hateoas.config.EnableHypermediaSupport; import org.springframework.hateoas.config.EnableHypermediaSupport.HypermediaType; import org.springframework.http.HttpStatus; @@ -95,6 +103,60 @@ public class TaskController { * multiple times without using the task-methods * @title Create a new Task */ + @Operation( + summary = "Create a new Task", + description = "This endpoint creates a persistent Task.", + requestBody = + @io.swagger.v3.oas.annotations.parameters.RequestBody( + description = "the Task which should be created.", + content = + @Content( + schema = @Schema(implementation = TaskRepresentationModel.class), + examples = + @ExampleObject( + value = + "{" + + "\"priority\" : 0," + + "\"manualPriority\" : -1," + + "\"classificationSummary\" : {" + + "\"key\" : \"L11010\"," + + "\"priority\" : 0" + + "}," + + "\"workbasketSummary\" : {" + + "\"workbasketId\" : " + + "\"WBI:100000000000000000000000000000000004\"," + + "\"markedForDeletion\" : false" + + "}," + + "\"primaryObjRef\" : {" + + "\"company\" : \"MyCompany1\"," + + "\"system\" : \"MySystem1\"," + + "\"systemInstance\" : \"MyInstance1\"," + + "\"type\" : \"MyType1\"," + + "\"value\" : \"00000001\"" + + "}," + + "\"secondaryObjectReferences\" : [ {" + + "\"company\" : \"company\"," + + "\"system\" : \"system\"," + + "\"systemInstance\" : \"systemInstance\"," + + "\"type\" : \"type\"," + + "\"value\" : \"value\"" + + "} ]," + + "\"customAttributes\" : [ ]," + + "\"callbackInfo\" : [ ]," + + "\"attachments\" : [ ]," + + "\"read\" : false," + + "\"transferred\" : false" + + "}"))), + responses = { + @ApiResponse( + responseCode = "201", + description = "the created Task", + content = { + @Content( + mediaType = MediaTypes.HAL_JSON_VALUE, + schema = @Schema(implementation = TaskRepresentationModel.class)) + }) + }) @PostMapping(path = RestEndpoints.URL_TASKS) @Transactional(rollbackFor = Exception.class) public ResponseEntity createTask( @@ -140,16 +202,34 @@ public ResponseEntity createTask( * @param pagingParameter the paging parameters * @return the Tasks with the given filter, sort and paging options. */ + @Operation( + summary = "Get a list of all Tasks", + description = "This endpoint retrieves a list of existing Tasks. Filters can be applied.", + parameters = { + @Parameter(name = "por-type", example = "VNR"), + @Parameter(name = "por-value", example = "22334455"), + @Parameter(name = "sort-by", example = "NAME") + }, + responses = { + @ApiResponse( + responseCode = "200", + description = "the Tasks with the given filter, sort and paging options.", + content = { + @Content( + mediaType = MediaTypes.HAL_JSON_VALUE, + schema = @Schema(implementation = TaskSummaryPagedRepresentationModel.class)) + }) + }) @GetMapping(path = RestEndpoints.URL_TASKS) @Transactional(readOnly = true, rollbackFor = Exception.class) public ResponseEntity getTasks( HttpServletRequest request, - TaskQueryFilterParameter filterParameter, - TaskQueryFilterCustomFields filterCustomFields, - TaskQueryFilterCustomIntFields filterCustomIntFields, - TaskQueryGroupByParameter groupByParameter, - TaskQuerySortParameter sortParameter, - QueryPagingParameter pagingParameter) { + @ParameterObject TaskQueryFilterParameter filterParameter, + @ParameterObject TaskQueryFilterCustomFields filterCustomFields, + @ParameterObject TaskQueryFilterCustomIntFields filterCustomIntFields, + @ParameterObject TaskQueryGroupByParameter groupByParameter, + @ParameterObject TaskQuerySortParameter sortParameter, + @ParameterObject QueryPagingParameter pagingParameter) { QueryParamsValidator.validateParams( request, TaskQueryFilterParameter.class, @@ -184,6 +264,26 @@ public ResponseEntity getTasks( * requested Task. * @title Get a single Task */ + @Operation( + summary = "Get a single Task", + description = "This endpoint retrieves a specific Task.", + parameters = { + @Parameter( + name = "taskId", + required = true, + description = "the Id of the requested Task", + example = "TKI:100000000000000000000000000000000000") + }, + responses = { + @ApiResponse( + responseCode = "200", + description = "the requested Task", + content = { + @Content( + mediaType = MediaTypes.HAL_JSON_VALUE, + schema = @Schema(implementation = TaskRepresentationModel.class)) + }) + }) @GetMapping(path = RestEndpoints.URL_TASKS_ID) @Transactional(readOnly = true, rollbackFor = Exception.class) public ResponseEntity getTask(@PathVariable("taskId") String taskId) @@ -210,6 +310,26 @@ public ResponseEntity getTask(@PathVariable("taskId") S * requested Task. * @title Claim a Task */ + @Operation( + summary = "Claim a Task", + description = "This endpoint claims a Task if possible.", + parameters = { + @Parameter( + name = "taskId", + required = true, + description = "the Id of the Task which should be claimed", + example = "TKI:000000000000000000000000000000000003") + }, + responses = { + @ApiResponse( + responseCode = "200", + description = "the claimed Task", + content = { + @Content( + mediaType = MediaTypes.HAL_JSON_VALUE, + schema = @Schema(implementation = TaskRepresentationModel.class)) + }) + }) @PostMapping(path = RestEndpoints.URL_TASKS_ID_CLAIM) @Transactional(rollbackFor = Exception.class) public ResponseEntity claimTask( @@ -236,6 +356,28 @@ public ResponseEntity claimTask( * requested Task. * @title Force claim a Task */ + @Operation( + summary = "Force claim a Task", + description = + "This endpoint force claims a Task if possible even if it is already claimed by someone " + + "else.", + parameters = { + @Parameter( + name = "taskId", + description = "the Id of the Task which should be force claimed", + required = true, + example = "TKI:000000000000000000000000000000000003") + }, + responses = { + @ApiResponse( + responseCode = "200", + description = "the force claimed Task", + content = { + @Content( + mediaType = MediaTypes.HAL_JSON_VALUE, + schema = @Schema(implementation = TaskRepresentationModel.class)) + }) + }) @PostMapping(path = RestEndpoints.URL_TASKS_ID_CLAIM_FORCE) @Transactional(rollbackFor = Exception.class) public ResponseEntity forceClaimTask( @@ -262,13 +404,32 @@ public ResponseEntity forceClaimTask( * Workbasket the Task is in * @title Select and claim a Task */ + @Operation( + summary = "Select and claim a Task", + description = + "This endpoint selects the first Task returned by the Task Query and claims it.", + parameters = {@Parameter(name = "custom14", example = "abc")}, + responses = { + @ApiResponse( + responseCode = "200", + description = "the claimed Task", + content = { + @Content( + mediaType = MediaTypes.HAL_JSON_VALUE, + schema = @Schema(implementation = TaskRepresentationModel.class)) + }), + @ApiResponse( + responseCode = "404", + description = "if no Task is found", + content = {@Content(schema = @Schema())}) + }) @PostMapping(path = RestEndpoints.URL_TASKS_ID_SELECT_AND_CLAIM) @Transactional(rollbackFor = Exception.class) public ResponseEntity selectAndClaimTask( - TaskQueryFilterParameter filterParameter, - TaskQueryFilterCustomFields filterCustomFields, - TaskQueryFilterCustomIntFields filterCustomIntFields, - TaskQuerySortParameter sortParameter) + @ParameterObject TaskQueryFilterParameter filterParameter, + @ParameterObject TaskQueryFilterCustomFields filterCustomFields, + @ParameterObject TaskQueryFilterCustomIntFields filterCustomIntFields, + @ParameterObject TaskQuerySortParameter sortParameter) throws InvalidOwnerException, NotAuthorizedOnWorkbasketException { TaskQuery query = taskService.createTaskQuery(); @@ -298,6 +459,31 @@ public ResponseEntity selectAndClaimTask( * Workbasket the Task is in * @title Cancel a claimed Task */ + @Operation( + summary = "Cancel a claimed Task", + description = + "This endpoint cancels the claim of an existing Task if it was claimed by the current " + + "user before.", + parameters = { + @Parameter( + name = "taskId", + description = "the Id of the requested Task.", + required = true, + example = "TKI:000000000000000000000000000000000002"), + @Parameter( + name = "keepOwner", + description = "flag whether or not to keep the owner despite the cancel claim") + }, + responses = { + @ApiResponse( + responseCode = "200", + description = "the unclaimed Task", + content = { + @Content( + mediaType = MediaTypes.HAL_JSON_VALUE, + schema = @Schema(implementation = TaskRepresentationModel.class)) + }) + }) @DeleteMapping(path = RestEndpoints.URL_TASKS_ID_CLAIM) @Transactional(rollbackFor = Exception.class) public ResponseEntity cancelClaimTask( @@ -325,6 +511,28 @@ public ResponseEntity cancelClaimTask( * Workbasket the Task is in * @title Force cancel a claimed Task */ + @Operation( + summary = "Force cancel a claimed Task", + description = "This endpoint force cancels the claim of an existing Task.", + parameters = { + @Parameter( + name = "taskId", + description = "the Id of the requested Task.", + required = true, + example = "TKI:000000000000000000000000000000000002"), + @Parameter( + name = "keepOwner", + description = "flag whether or not to keep the owner despite the cancel claim.") + }, + responses = { + @ApiResponse( + responseCode = "200", + description = "the unclaimed Task.", + content = + @Content( + mediaType = MediaTypes.HAL_JSON_VALUE, + schema = @Schema(implementation = TaskRepresentationModel.class))) + }) @DeleteMapping(path = RestEndpoints.URL_TASKS_ID_CLAIM_FORCE) @Transactional(rollbackFor = Exception.class) public ResponseEntity forceCancelClaimTask( @@ -350,6 +558,22 @@ public ResponseEntity forceCancelClaimTask( * Workbasket the Task is in * @title Request a review on a Task */ + @Operation( + summary = "Request a review on a Task", + description = "This endpoint requests a review on the specified Task.", + parameters = { + @Parameter( + name = "taskId", + description = "the id of the relevant Task", + required = true, + example = "TKI:000000000000000000000000000000000032") + }, + responses = { + @ApiResponse( + responseCode = "200", + description = "the Task after a review has been requested", + content = @Content(schema = @Schema(implementation = TaskRepresentationModel.class))), + }) @PostMapping(path = RestEndpoints.URL_TASKS_ID_REQUEST_REVIEW) @Transactional(rollbackFor = Exception.class) public ResponseEntity requestReview( @@ -374,6 +598,22 @@ public ResponseEntity requestReview( * Workbasket the Task is in * @title Force request a review on a Task */ + @Operation( + summary = "Force request a review on a Task", + description = "This endpoint force requests a review on the specified Task.", + parameters = { + @Parameter( + name = "taskId", + description = "the id of the relevant Task", + required = true, + example = "TKI:000000000000000000000000000000000101") + }, + responses = { + @ApiResponse( + responseCode = "200", + description = "the Task after a review has been requested", + content = @Content(schema = @Schema(implementation = TaskRepresentationModel.class))) + }) @PostMapping(path = RestEndpoints.URL_TASKS_ID_REQUEST_REVIEW_FORCE) @Transactional(rollbackFor = Exception.class) public ResponseEntity forceRequestReview( @@ -398,6 +638,22 @@ public ResponseEntity forceRequestReview( * Workbasket the Task is in * @title Request changes on a Task */ + @Operation( + summary = "Request changes on a Task", + description = "This endpoint requests changes on the specified Task.", + parameters = { + @Parameter( + name = "taskId", + description = "the id of the relevant Task", + required = true, + example = "TKI:000000000000000000000000000000000136") + }, + responses = { + @ApiResponse( + responseCode = "200", + description = "Changes requested successfully", + content = @Content(schema = @Schema(implementation = TaskRepresentationModel.class))), + }) @PostMapping(path = RestEndpoints.URL_TASKS_ID_REQUEST_CHANGES) @Transactional(rollbackFor = Exception.class) public ResponseEntity requestChanges( @@ -422,6 +678,22 @@ public ResponseEntity requestChanges( * Workbasket the Task is in * @title Force request changes on a Task */ + @Operation( + summary = "Force request changes on a Task", + description = "This endpoint force requests changes on the specified Task.", + parameters = { + @Parameter( + name = "taskId", + description = "the Id of the Task on which a review should be requested", + required = true, + example = "TKI:000000000000000000000000000000000100") + }, + responses = { + @ApiResponse( + responseCode = "200", + description = "the change requested Task", + content = @Content(schema = @Schema(implementation = TaskRepresentationModel.class))), + }) @PostMapping(path = RestEndpoints.URL_TASKS_ID_REQUEST_CHANGES_FORCE) @Transactional(rollbackFor = Exception.class) public ResponseEntity forceRequestChanges( @@ -446,6 +718,22 @@ public ResponseEntity forceRequestChanges( * Workbasket the Task is in * @title Complete a Task */ + @Operation( + summary = "Complete a Task", + description = "This endpoint completes a Task.", + parameters = { + @Parameter( + name = "taskId", + description = "Id of the requested Task to complete.", + example = "TKI:000000000000000000000000000000000003", + required = true) + }, + responses = { + @ApiResponse( + responseCode = "200", + description = "the completed Task", + content = @Content(schema = @Schema(implementation = TaskRepresentationModel.class))) + }) @PostMapping(path = RestEndpoints.URL_TASKS_ID_COMPLETE) @Transactional(rollbackFor = Exception.class) public ResponseEntity completeTask( @@ -473,6 +761,22 @@ public ResponseEntity completeTask( * Workbasket the Task is in * @title Force complete a Task */ + @Operation( + summary = "Force complete a Task", + description = "This endpoint force completes a Task.", + parameters = { + @Parameter( + name = "taskId", + description = "Id of the requested Task to force complete.", + example = "TKI:000000000000000000000000000000000003", + required = true) + }, + responses = { + @ApiResponse( + responseCode = "200", + description = "the force completed Task", + content = @Content(schema = @Schema(implementation = TaskRepresentationModel.class))) + }) @PostMapping(path = RestEndpoints.URL_TASKS_ID_COMPLETE_FORCE) @Transactional(rollbackFor = Exception.class) public ResponseEntity forceCompleteTask( @@ -499,6 +803,24 @@ public ResponseEntity forceCompleteTask( * Workbasket the Task is in * @title Cancel a Task */ + @Operation( + summary = "Cancel a Task", + description = + "This endpoint cancels a Task. Cancellation marks a Task as obsolete. The actual work " + + "the Task was referring to is no longer required", + parameters = { + @Parameter( + name = "taskId", + description = "Id of the requested Task to cancel.", + example = "TKI:000000000000000000000000000000000026", + required = true) + }, + responses = { + @ApiResponse( + responseCode = "200", + description = "the cancelled Task", + content = @Content(schema = @Schema(implementation = TaskRepresentationModel.class))) + }) @PostMapping(path = RestEndpoints.URL_TASKS_ID_CANCEL) @Transactional(rollbackFor = Exception.class) public ResponseEntity cancelTask(@PathVariable("taskId") String taskId) @@ -520,6 +842,24 @@ public ResponseEntity cancelTask(@PathVariable("taskId" * @throws NotAuthorizedOnWorkbasketException if the current user has not correct permissions * @title Terminate a Task */ + @Operation( + summary = "Terminate a Task", + description = + "This endpoint terminates a Task. Termination is an administrative action to complete a " + + "Task.", + parameters = { + @Parameter( + name = "taskId", + description = "Id of the requested Task to terminate.", + required = true, + example = "TKI:000000000000000000000000000000000000") + }, + responses = { + @ApiResponse( + responseCode = "200", + description = "the terminated Task", + content = @Content(schema = @Schema(implementation = TaskRepresentationModel.class))) + }) @PostMapping(path = RestEndpoints.URL_TASKS_ID_TERMINATE) @Transactional(rollbackFor = Exception.class) public ResponseEntity terminateTask( @@ -548,6 +888,34 @@ public ResponseEntity terminateTask( * the Task. * @throws InvalidTaskStateException if the Task is in a state which does not allow transferring. */ + @Operation( + summary = "Transfer a Task to another Workbasket", + description = "This endpoint transfers a Task to a given Workbasket, if possible.", + parameters = { + @Parameter( + name = "taskId", + description = "the Id of the Task which should be transferred", + example = "TKI:000000000000000000000000000000000004", + required = true), + @Parameter( + name = "workbasketId", + description = "the Id of the destination Workbasket", + example = "WBI:100000000000000000000000000000000001", + required = true) + }, + requestBody = + @io.swagger.v3.oas.annotations.parameters.RequestBody( + description = "sets the tansfer flag of the task (default: true)", + content = + @Content( + schema = @Schema(implementation = TaskRepresentationModel.class), + examples = @ExampleObject(value = "{\"setTransferFlag\": false}"))), + responses = { + @ApiResponse( + responseCode = "200", + description = "the successfully transferred Task.", + content = @Content(schema = @Schema(implementation = TaskRepresentationModel.class))) + }) @PostMapping(path = RestEndpoints.URL_TASKS_ID_TRANSFER_WORKBASKET_ID) @Transactional(rollbackFor = Exception.class) public ResponseEntity transferTask( @@ -584,6 +952,119 @@ public ResponseEntity transferTask( * Task is not in state READY. * @title Update a Task */ + @Operation( + summary = "Update a Task", + description = "This endpoint updates a requested Task.", + parameters = { + @Parameter( + name = "taskId", + description = "the Id of the Task which should be updated", + example = "TKI:000000000000000000000000000000000003", + required = true) + }, + requestBody = + @io.swagger.v3.oas.annotations.parameters.RequestBody( + description = "the new Task for the requested id.", + content = + @Content( + schema = @Schema(implementation = TaskRepresentationModel.class), + examples = + @ExampleObject( + value = + "{\n" + + " \"taskId\": " + + "\"TKI:000000000000000000000000000000000003\",\n" + + " \"externalId\": " + + "\"ETI:000000000000000000000000000000000003\",\n" + + " \"created\": \"2018-02-01T12:00:00.000Z\",\n" + + " \"modified\": \"2018-02-01T12:00:00.000Z\",\n" + + " \"planned\": \"2024-05-27T15:27:56.595Z\",\n" + + " \"received\": \"2024-05-29T15:27:56.595Z\",\n" + + " \"due\": \"2024-05-29T15:27:56.595Z\",\n" + + " \"name\": \"Widerruf\",\n" + + " \"creator\": \"creator_user_id\",\n" + + " \"description\": \"new description\",\n" + + " \"priority\": 2,\n" + + " \"manualPriority\": -1,\n" + + " \"state\": \"READY\",\n" + + " \"classificationSummary\": {\n" + + " \"classificationId\": " + + "\"CLI:100000000000000000000000000000000003\",\n" + + " \"key\": \"L1050\",\n" + + " \"applicationEntryPoint\": \"\",\n" + + " \"category\": \"EXTERNAL\",\n" + + " \"domain\": \"DOMAIN_A\",\n" + + " \"name\": \"Widerruf\",\n" + + " \"parentId\": \"\",\n" + + " \"parentKey\": \"\",\n" + + " \"priority\": 1,\n" + + " \"serviceLevel\": \"P13D\",\n" + + " \"type\": \"TASK\",\n" + + " \"custom1\": \"VNR,RVNR,KOLVNR\",\n" + + " \"custom2\": \"\",\n" + + " \"custom3\": \"\",\n" + + " \"custom4\": \"\",\n" + + " \"custom5\": \"\",\n" + + " \"custom6\": \"\",\n" + + " \"custom7\": \"\",\n" + + " \"custom8\": \"\"\n" + + " },\n" + + " \"workbasketSummary\": {\n" + + " \"workbasketId\": " + + "\"WBI:100000000000000000000000000000000001\",\n" + + " \"key\": \"GPK_KSC\",\n" + + " \"name\": \"Gruppenpostkorb KSC\",\n" + + " \"domain\": \"DOMAIN_A\",\n" + + " \"type\": \"GROUP\",\n" + + " \"description\": \"Gruppenpostkorb KSC\",\n" + + " \"owner\": \"teamlead-1\",\n" + + " \"custom1\": \"ABCQVW\",\n" + + " \"custom2\": \"\",\n" + + " \"custom3\": \"xyz4\",\n" + + " \"custom4\": \"\",\n" + + " \"custom5\": \"\",\n" + + " \"custom6\": \"\",\n" + + " \"custom7\": \"\",\n" + + " \"custom8\": \"\",\n" + + " \"orgLevel1\": \"\",\n" + + " \"orgLevel2\": \"\",\n" + + " \"orgLevel3\": \"\",\n" + + " \"orgLevel4\": \"\",\n" + + " \"markedForDeletion\": false\n" + + " },\n" + + " \"businessProcessId\": \"PI_0000000000003\",\n" + + " \"parentBusinessProcessId\": " + + "\"DOC_0000000000000000003\",\n" + + " \"primaryObjRef\": {\n" + + " \"company\": \"00\",\n" + + " \"system\": \"PASystem\",\n" + + " \"systemInstance\": \"00\",\n" + + " \"type\": \"VNR\",\n" + + " \"value\": \"11223344\"\n" + + " },\n" + + " \"custom1\": \"efg\",\n" + + " \"custom14\": \"abc\",\n" + + " \"customInt1\": 1,\n" + + " \"customInt2\": 2,\n" + + " \"customInt3\": 3,\n" + + " \"customInt4\": 4,\n" + + " \"customInt5\": 5,\n" + + " \"customInt6\": 6,\n" + + " \"customInt7\": 7,\n" + + " \"customInt8\": 8,\n" + + " \"secondaryObjectReferences\": [],\n" + + " \"customAttributes\": [],\n" + + " \"callbackInfo\": [],\n" + + " \"attachments\": [],\n" + + " \"read\": false,\n" + + " \"transferred\": false\n" + + "}"))), + responses = { + @ApiResponse( + responseCode = "200", + description = "the updated Task", + content = @Content(schema = @Schema(implementation = TaskRepresentationModel.class))) + }) @PutMapping(path = RestEndpoints.URL_TASKS_ID) @Transactional(rollbackFor = Exception.class) public ResponseEntity updateTask( @@ -630,6 +1111,30 @@ public ResponseEntity updateTask( * Workbasket the Task is in * @title Set a Task read or unread */ + @Operation( + summary = "Set a Task read or unread", + description = "This endpoint sets the 'isRead' property of a Task.", + parameters = { + @Parameter( + name = "taskId", + description = "Id of the requested Task to set read or unread.", + example = "TKI:000000000000000000000000000000000025", + required = true) + }, + requestBody = + @io.swagger.v3.oas.annotations.parameters.RequestBody( + description = + "if true, the Task property isRead is set to true, else it's set to false", + content = + @Content( + schema = @Schema(implementation = TaskRepresentationModel.class), + examples = @ExampleObject(value = "{\"is-read\": true}"))), + responses = { + @ApiResponse( + responseCode = "200", + description = "the updated Task", + content = @Content(schema = @Schema(implementation = TaskRepresentationModel.class))) + }) @PostMapping(path = RestEndpoints.URL_TASKS_ID_SET_READ) @Transactional(rollbackFor = Exception.class) public ResponseEntity setTaskRead( @@ -657,6 +1162,17 @@ public ResponseEntity setTaskRead( * @throws NotAuthorizedOnWorkbasketException if the current user has not correct permissions * @throws InvalidCallbackStateException some comment */ + @Operation( + summary = "Delete a Task", + description = "This endpoint deletes a Task.", + parameters = { + @Parameter( + name = "taskId", + description = "the Id of the Task which should be deleted.", + required = true, + example = "TKI:000000000000000000000000000000000039") + }, + responses = {@ApiResponse(responseCode = "204", content = @Content(schema = @Schema()))}) @DeleteMapping(path = RestEndpoints.URL_TASKS_ID) @Transactional(rollbackFor = Exception.class) public ResponseEntity deleteTask(@PathVariable("taskId") String taskId) @@ -683,6 +1199,17 @@ public ResponseEntity deleteTask(@PathVariable("taskId" * @throws NotAuthorizedOnWorkbasketException if the current user has not correct * @throws InvalidCallbackStateException some comment */ + @Operation( + summary = "Force delete a Task", + description = "This endpoint force deletes a Task.", + parameters = { + @Parameter( + name = "taskId", + description = "the Id of the Task which should be force deleted.", + example = "TKI:000000000000000000000000000000000005", + required = true) + }, + responses = {@ApiResponse(responseCode = "204", content = @Content(schema = @Schema()))}) @DeleteMapping(path = RestEndpoints.URL_TASKS_ID_FORCE) @Transactional(rollbackFor = Exception.class) public ResponseEntity forceDeleteTask( @@ -710,12 +1237,35 @@ public ResponseEntity forceDeleteTask( * @throws NotAuthorizedException if the current user is not authorized to delete the requested * Tasks. */ + @Operation( + summary = "Delete multiple Tasks", + description = + "This endpoint deletes an aggregation of Tasks and returns the deleted Tasks. Filters " + + "can be applied.", + parameters = { + @Parameter( + name = "task-id", + examples = { + @ExampleObject(value = "TKI:000000000000000000000000000000000036"), + @ExampleObject(value = "TKI:000000000000000000000000000000000037"), + @ExampleObject(value = "TKI:000000000000000000000000000000000038") + }) + }, + responses = { + @ApiResponse( + responseCode = "200", + description = "the deleted task summaries", + content = + @Content( + schema = + @Schema(implementation = TaskSummaryCollectionRepresentationModel.class))) + }) @DeleteMapping(path = RestEndpoints.URL_TASKS) @Transactional(readOnly = true, rollbackFor = Exception.class) public ResponseEntity deleteTasks( - TaskQueryFilterParameter filterParameter, - TaskQueryFilterCustomFields filterCustomFields, - TaskQueryFilterCustomIntFields filterCustomIntFields) + @ParameterObject TaskQueryFilterParameter filterParameter, + @ParameterObject TaskQueryFilterCustomFields filterCustomFields, + @ParameterObject TaskQueryFilterCustomIntFields filterCustomIntFields) throws InvalidArgumentException, NotAuthorizedException { TaskQuery query = taskService.createTaskQuery(); filterParameter.apply(query); diff --git a/rest/taskana-rest-spring/src/main/java/pro/taskana/task/rest/TaskQueryFilterCustomFields.java b/rest/taskana-rest-spring/src/main/java/pro/taskana/task/rest/TaskQueryFilterCustomFields.java index 143d989328..a96a7e10be 100644 --- a/rest/taskana-rest-spring/src/main/java/pro/taskana/task/rest/TaskQueryFilterCustomFields.java +++ b/rest/taskana-rest-spring/src/main/java/pro/taskana/task/rest/TaskQueryFilterCustomFields.java @@ -20,6 +20,7 @@ import static pro.taskana.task.api.TaskCustomField.CUSTOM_9; import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.beans.ConstructorProperties; import java.util.Optional; import java.util.stream.Stream; @@ -28,11 +29,271 @@ import pro.taskana.task.api.TaskQuery; public class TaskQueryFilterCustomFields implements QueryParameter { + public String[] getCustom1In() { + return custom1In; + } + + public String[] getCustom1NotIn() { + return custom1NotIn; + } + + public String[] getCustom1Like() { + return custom1Like; + } + + public String[] getCustom1NotLike() { + return custom1NotLike; + } + + public String[] getCustom2In() { + return custom2In; + } + + public String[] getCustom2NotIn() { + return custom2NotIn; + } + + public String[] getCustom2Like() { + return custom2Like; + } + + public String[] getCustom2NotLike() { + return custom2NotLike; + } + + public String[] getCustom3In() { + return custom3In; + } + + public String[] getCustom3NotIn() { + return custom3NotIn; + } + + public String[] getCustom3Like() { + return custom3Like; + } + + public String[] getCustom3NotLike() { + return custom3NotLike; + } + + public String[] getCustom4In() { + return custom4In; + } + + public String[] getCustom4NotIn() { + return custom4NotIn; + } + + public String[] getCustom4Like() { + return custom4Like; + } + + public String[] getCustom4NotLike() { + return custom4NotLike; + } + + public String[] getCustom5In() { + return custom5In; + } + + public String[] getCustom5NotIn() { + return custom5NotIn; + } + + public String[] getCustom5Like() { + return custom5Like; + } + + public String[] getCustom5NotLike() { + return custom5NotLike; + } + + public String[] getCustom6In() { + return custom6In; + } + + public String[] getCustom6NotIn() { + return custom6NotIn; + } + + public String[] getCustom6Like() { + return custom6Like; + } + + public String[] getCustom6NotLike() { + return custom6NotLike; + } + + public String[] getCustom7In() { + return custom7In; + } + + public String[] getCustom7NotIn() { + return custom7NotIn; + } + + public String[] getCustom7Like() { + return custom7Like; + } + + public String[] getCustom7NotLike() { + return custom7NotLike; + } + + public String[] getCustom8In() { + return custom8In; + } + + public String[] getCustom8NotIn() { + return custom8NotIn; + } + + public String[] getCustom8Like() { + return custom8Like; + } + + public String[] getCustom8NotLike() { + return custom8NotLike; + } + + public String[] getCustom9In() { + return custom9In; + } + + public String[] getCustom9NotIn() { + return custom9NotIn; + } + + public String[] getCustom9Like() { + return custom9Like; + } + + public String[] getCustom9NotLike() { + return custom9NotLike; + } + + public String[] getCustom10In() { + return custom10In; + } + + public String[] getCustom10NotIn() { + return custom10NotIn; + } + + public String[] getCustom10Like() { + return custom10Like; + } + + public String[] getCustom10NotLike() { + return custom10NotLike; + } + + public String[] getCustom11In() { + return custom11In; + } + + public String[] getCustom11NotIn() { + return custom11NotIn; + } + + public String[] getCustom11Like() { + return custom11Like; + } + + public String[] getCustom11NotLike() { + return custom11NotLike; + } + + public String[] getCustom12In() { + return custom12In; + } + + public String[] getCustom12NotIn() { + return custom12NotIn; + } + + public String[] getCustom12Like() { + return custom12Like; + } + + public String[] getCustom12NotLike() { + return custom12NotLike; + } + + public String[] getCustom13In() { + return custom13In; + } + + public String[] getCustom13NotIn() { + return custom13NotIn; + } + + public String[] getCustom13Like() { + return custom13Like; + } + + public String[] getCustom13NotLike() { + return custom13NotLike; + } + + public String[] getCustom14In() { + return custom14In; + } + + public String[] getCustom14NotIn() { + return custom14NotIn; + } + + public String[] getCustom14Like() { + return custom14Like; + } + + public String[] getCustom14NotLike() { + return custom14NotLike; + } + + public String[] getCustom15In() { + return custom15In; + } + + public String[] getCustom15NotIn() { + return custom15NotIn; + } + + public String[] getCustom15Like() { + return custom15Like; + } + + public String[] getCustom15NotLike() { + return custom15NotLike; + } + + public String[] getCustom16In() { + return custom16In; + } + + public String[] getCustom16NotIn() { + return custom16NotIn; + } + + public String[] getCustom16Like() { + return custom16Like; + } + + public String[] getCustom16NotLike() { + return custom16NotLike; + } + /** Filter by the value of the field custom1 of the Task. This is an exact match. */ + @Schema( + name = "custom-1", + description = "Filter by the value of the field custom1 of the Task. This is an exact match.") @JsonProperty("custom-1") private final String[] custom1In; /** Exclude values of the field custom1 of the Task. */ + @Schema(name = "custom-1-not", description = "Exclude values of the field custom1 of the Task.") @JsonProperty("custom-1-not") private final String[] custom1NotIn; @@ -41,6 +302,12 @@ public class TaskQueryFilterCustomFields implements QueryParameter { + public Integer[] getCustomInt1In() { + return customInt1In; + } + + public Integer[] getCustomInt1NotIn() { + return customInt1NotIn; + } + + public Integer[] getCustomInt1Within() { + return customInt1Within; + } + + public Integer[] getCustomInt1NotWithin() { + return customInt1NotWithin; + } + + public Integer getCustomInt1From() { + return customInt1From; + } + + public Integer getCustomInt1FromNot() { + return customInt1FromNot; + } + + public Integer getCustomInt1To() { + return customInt1To; + } + + public Integer getCustomInt1ToNot() { + return customInt1ToNot; + } + + public Integer[] getCustomInt2In() { + return customInt2In; + } + + public Integer[] getCustomInt2NotIn() { + return customInt2NotIn; + } + + public Integer[] getCustomInt2Within() { + return customInt2Within; + } + + public Integer[] getCustomInt2NotWithin() { + return customInt2NotWithin; + } + + public Integer getCustomInt2From() { + return customInt2From; + } + + public Integer getCustomInt2FromNot() { + return customInt2FromNot; + } + + public Integer getCustomInt2To() { + return customInt2To; + } + + public Integer getCustomInt2ToNot() { + return customInt2ToNot; + } + + public Integer[] getCustomInt3In() { + return customInt3In; + } + + public Integer[] getCustomInt3NotIn() { + return customInt3NotIn; + } + + public Integer[] getCustomInt3Within() { + return customInt3Within; + } + + public Integer[] getCustomInt3NotWithin() { + return customInt3NotWithin; + } + + public Integer getCustomInt3From() { + return customInt3From; + } + + public Integer getCustomInt3FromNot() { + return customInt3FromNot; + } + + public Integer getCustomInt3To() { + return customInt3To; + } + + public Integer getCustomInt3ToNot() { + return customInt3ToNot; + } + + public Integer[] getCustomInt4In() { + return customInt4In; + } + + public Integer[] getCustomInt4NotIn() { + return customInt4NotIn; + } + + public Integer[] getCustomInt4Within() { + return customInt4Within; + } + + public Integer[] getCustomInt4NotWithin() { + return customInt4NotWithin; + } + + public Integer getCustomInt4From() { + return customInt4From; + } + + public Integer getCustomInt4FromNot() { + return customInt4FromNot; + } + + public Integer getCustomInt4To() { + return customInt4To; + } + + public Integer getCustomInt4ToNot() { + return customInt4ToNot; + } + + public Integer[] getCustomInt5In() { + return customInt5In; + } + + public Integer[] getCustomInt5NotIn() { + return customInt5NotIn; + } + + public Integer[] getCustomInt5Within() { + return customInt5Within; + } + + public Integer[] getCustomInt5NotWithin() { + return customInt5NotWithin; + } + + public Integer getCustomInt5From() { + return customInt5From; + } + + public Integer getCustomInt5FromNot() { + return customInt5FromNot; + } + + public Integer getCustomInt5To() { + return customInt5To; + } + + public Integer getCustomInt5ToNot() { + return customInt5ToNot; + } + + public Integer[] getCustomInt6In() { + return customInt6In; + } + + public Integer[] getCustomInt6NotIn() { + return customInt6NotIn; + } + + public Integer[] getCustomInt6Within() { + return customInt6Within; + } + + public Integer[] getCustomInt6NotWithin() { + return customInt6NotWithin; + } + + public Integer getCustomInt6From() { + return customInt6From; + } + + public Integer getCustomInt6FromNot() { + return customInt6FromNot; + } + + public Integer getCustomInt6To() { + return customInt6To; + } + + public Integer getCustomInt6ToNot() { + return customInt6ToNot; + } + + public Integer[] getCustomInt7In() { + return customInt7In; + } + + public Integer[] getCustomInt7NotIn() { + return customInt7NotIn; + } + + public Integer[] getCustomInt7Within() { + return customInt7Within; + } + + public Integer[] getCustomInt7NotWithin() { + return customInt7NotWithin; + } + + public Integer getCustomInt7From() { + return customInt7From; + } + + public Integer getCustomInt7FromNot() { + return customInt7FromNot; + } + + public Integer getCustomInt7To() { + return customInt7To; + } + + public Integer getCustomInt7ToNot() { + return customInt7ToNot; + } + + public Integer[] getCustomInt8In() { + return customInt8In; + } + + public Integer[] getCustomInt8NotIn() { + return customInt8NotIn; + } + + public Integer[] getCustomInt8Within() { + return customInt8Within; + } + + public Integer[] getCustomInt8NotWithin() { + return customInt8NotWithin; + } + + public Integer getCustomInt8From() { + return customInt8From; + } + + public Integer getCustomInt8FromNot() { + return customInt8FromNot; + } + + public Integer getCustomInt8To() { + return customInt8To; + } + + public Integer getCustomInt8ToNot() { + return customInt8ToNot; + } /** Filter by the value of the field customInt1 of the Task. This is an exact match. */ + @Schema( + name = "custom-int-1", + description = + "Filter by the value of the field customInt1 of the Task. This is an exact match.") @JsonProperty("custom-int-1") private final Integer[] customInt1In; /** Exclude values of the field customInt1 of the Task. */ + @Schema( + name = "custom-int-1-not", + description = "Exclude values of the field customInt1 of the Task.") @JsonProperty("custom-int-1-not") private final Integer[] customInt1NotIn; /** Filter by the range of value of the field customInt1 of the Task. */ + @Schema( + name = "custom-int-1-within", + description = "Filter by the range of value of the field customInt1 of the Task.") @JsonProperty("custom-int-1-within") private final Integer[] customInt1Within; /** Exclude range of values of the field customInt1 of the Task. */ + @Schema( + name = "custom-int-1-not-within", + description = "Exclude range of values of the field customInt1 of the Task.") @JsonProperty("custom-int-1-not-within") private final Integer[] customInt1NotWithin; @@ -36,9 +305,17 @@ public class TaskQueryFilterCustomIntFields implements QueryParameterThis parameter can't be used together with 'custom-int-1-within'. */ + @Schema( + name = "custom-int-1-from", + description = + "Filter by lower bound of customInt1.

This parameter can't be used together with " + + "'custom-int-1-within'.") @JsonProperty("custom-int-1-from") private final Integer customInt1From; /** Exclude values from a lower bound of the field customInt1 of the Task. */ + @Schema( + name = "custom-int-1-from-not", + description = "Exclude values from a lower bound of the field customInt1 of the Task.") @JsonProperty("custom-int-1-from-not") private final Integer customInt1FromNot; /** @@ -46,24 +323,45 @@ public class TaskQueryFilterCustomIntFields implements QueryParameterThis parameter can't be used together with 'custom-int-1-within'. */ + @Schema( + name = "custom-int-1-to", + description = + "Filter by upper bound of customInt1.

This parameter can't be used together with " + + "'custom-int-1-within'.") @JsonProperty("custom-int-1-to") private final Integer customInt1To; /** Exclude values to an upper bound of the field customInt1 of the Task. */ + @Schema( + name = "custom-int-1-to-not", + description = "Exclude values to an upper bound of the field customInt1 of the Task.") @JsonProperty("custom-int-1-to-not") private final Integer customInt1ToNot; /** Filter by the value of the field customInt2 of the Task. This is an exact match. */ + @Schema( + name = "custom-int-2", + description = + "Filter by the value of the field customInt2 of the Task. This is an exact match.") @JsonProperty("custom-int-2") private final Integer[] customInt2In; /** Exclude values of the field customInt2 of the Task. */ + @Schema( + name = "custom-int-2-not", + description = "Exclude values of the field customInt2 of the Task.") @JsonProperty("custom-int-2-not") private final Integer[] customInt2NotIn; /** Filter by the range of value of the field customInt2 of the Task. */ + @Schema( + name = "custom-int-2-within", + description = "Filter by the range of value of the field customInt2 of the Task.") @JsonProperty("custom-int-2-within") private final Integer[] customInt2Within; /** Exclude range of values of the field customInt2 of the Task. */ + @Schema( + name = "custom-int-2-not-within", + description = "Exclude range of values of the field customInt2 of the Task.") @JsonProperty("custom-int-2-not-within") private final Integer[] customInt2NotWithin; /** @@ -71,9 +369,17 @@ public class TaskQueryFilterCustomIntFields implements QueryParameterThis parameter can't be used together with 'custom-int-2-within'. */ + @Schema( + name = "custom-int-2-from", + description = + "Filter by lower bound of customInt2.

This parameter can't be used together with " + + "'custom-int-2-within'.") @JsonProperty("custom-int-2-from") private final Integer customInt2From; /** Exclude values from a lower bound of the field customInt2 of the Task. */ + @Schema( + name = "custom-int-2-from-not", + description = "Exclude values from a lower bound of the field customInt2 of the Task.") @JsonProperty("custom-int-2-from-not") private final Integer customInt2FromNot; /** @@ -81,22 +387,43 @@ public class TaskQueryFilterCustomIntFields implements QueryParameterThis parameter can't be used together with 'custom-int-2-within'. */ + @Schema( + name = "custom-int-2-to", + description = + "Filter by upper bound of customInt2.

This parameter can't be used together with " + + "'custom-int-2-within'.") @JsonProperty("custom-int-2-to") private final Integer customInt2To; /** Exclude values to an upper bound of the field customInt2 of the Task. */ + @Schema( + name = "custom-int-2-to-not", + description = "Exclude values to an upper bound of the field customInt2 of the Task.") @JsonProperty("custom-int-2-to-not") private final Integer customInt2ToNot; /** Filter by the value of the field customInt3 of the Task. This is an exact match. */ + @Schema( + name = "custom-int-3", + description = + "Filter by the value of the field customInt3 of the Task. This is an exact match.") @JsonProperty("custom-int-3") private final Integer[] customInt3In; /** Exclude values of the field customInt3 of the Task. */ + @Schema( + name = "custom-int-3-not", + description = "Exclude values of the field customInt3 of the Task.") @JsonProperty("custom-int-3-not") private final Integer[] customInt3NotIn; /** Filter by the range of value of the field customInt3 of the Task. */ + @Schema( + name = "custom-int-3-within", + description = "Filter by the range of value of the field customInt3 of the Task.") @JsonProperty("custom-int-3-within") private final Integer[] customInt3Within; /** Exclude range of values of the field customInt3 of the Task. */ + @Schema( + name = "custom-int-3-not-within", + description = "Exclude range of values of the field customInt3 of the Task.") @JsonProperty("custom-int-3-not-within") private final Integer[] customInt3NotWithin; /** @@ -104,9 +431,17 @@ public class TaskQueryFilterCustomIntFields implements QueryParameterThis parameter can't be used together with 'custom-int-3-within'. */ + @Schema( + name = "custom-int-3-from", + description = + "Filter by lower bound of customInt3.

This parameter can't be used together with " + + "'custom-int-3-within'.") @JsonProperty("custom-int-3-from") private final Integer customInt3From; /** Exclude values from a lower bound of the field customInt3 of the Task. */ + @Schema( + name = "custom-int-3-from-not", + description = "Exclude values from a lower bound of the field customInt3 of the Task.") @JsonProperty("custom-int-3-from-not") private final Integer customInt3FromNot; /** @@ -114,22 +449,43 @@ public class TaskQueryFilterCustomIntFields implements QueryParameterThis parameter can't be used together with 'custom-int-3-within'. */ + @Schema( + name = "custom-int-3-to", + description = + "Filter by upper bound of customInt3.

This parameter can't be used together with " + + "'custom-int-3-within'.") @JsonProperty("custom-int-3-to") private final Integer customInt3To; /** Exclude values to an upper bound of the field customInt3 of the Task. */ + @Schema( + name = "custom-int-3-to-not", + description = "Exclude values to an upper bound of the field customInt3 of the Task.") @JsonProperty("custom-int-3-to-not") private final Integer customInt3ToNot; /** Filter by the value of the field customInt4 of the Task. This is an exact match. */ + @Schema( + name = "custom-int-4", + description = + "Filter by the value of the field customInt4 of the Task. This is an exact match.") @JsonProperty("custom-int-4") private final Integer[] customInt4In; /** Exclude values of the field customInt4 of the Task. */ + @Schema( + name = "custom-int-4-not", + description = "Exclude values of the field customInt4 of the Task.") @JsonProperty("custom-int-4-not") private final Integer[] customInt4NotIn; /** Filter by the range of value of the field customInt4 of the Task. */ + @Schema( + name = "custom-int-4-within", + description = "Filter by the range of value of the field customInt4 of the Task.") @JsonProperty("custom-int-4-within") private final Integer[] customInt4Within; /** Exclude range of values of the field customInt4 of the Task. */ + @Schema( + name = "custom-int-4-not-within", + description = "Exclude range of values of the field customInt4 of the Task.") @JsonProperty("custom-int-4-not-within") private final Integer[] customInt4NotWithin; /** @@ -137,9 +493,17 @@ public class TaskQueryFilterCustomIntFields implements QueryParameterThis parameter can't be used together with 'custom-int-4-within'. */ + @Schema( + name = "custom-int-4-from", + description = + "Filter by lower bound of customInt4.

This parameter can't be used together with " + + "'custom-int-4-within'.") @JsonProperty("custom-int-4-from") private final Integer customInt4From; /** Exclude values from a lower bound of the field customInt4 of the Task. */ + @Schema( + name = "custom-int-4-from-not", + description = "Exclude values from a lower bound of the field customInt4 of the Task.") @JsonProperty("custom-int-4-from-not") private final Integer customInt4FromNot; /** @@ -147,22 +511,43 @@ public class TaskQueryFilterCustomIntFields implements QueryParameterThis parameter can't be used together with 'custom-int-4-within'. */ + @Schema( + name = "custom-int-4-to", + description = + "Filter by upper bound of customInt4.

This parameter can't be used together with " + + "'custom-int-4-within'.") @JsonProperty("custom-int-4-to") private final Integer customInt4To; /** Exclude values to an upper bound of the field customInt4 of the Task. */ + @Schema( + name = "custom-int-4-to-not", + description = "Exclude values to an upper bound of the field customInt4 of the Task.") @JsonProperty("custom-int-4-to-not") private final Integer customInt4ToNot; /** Filter by the value of the field customInt5 of the Task. This is an exact match. */ + @Schema( + name = "custom-int-5", + description = + "Filter by the value of the field customInt5 of the Task. This is an exact match.") @JsonProperty("custom-int-5") private final Integer[] customInt5In; /** Exclude values of the field customInt5 of the Task. */ + @Schema( + name = "custom-int-5-not", + description = "Exclude values of the field customInt5 of the Task.") @JsonProperty("custom-int-5-not") private final Integer[] customInt5NotIn; /** Filter by the range of value of the field customInt5 of the Task. */ + @Schema( + name = "custom-int-5-within", + description = "Filter by the range of value of the field customInt5 of the Task.") @JsonProperty("custom-int-5-within") private final Integer[] customInt5Within; /** Exclude range of values of the field customInt5 of the Task. */ + @Schema( + name = "custom-int-5-not-within", + description = "Exclude range of values of the field customInt5 of the Task.") @JsonProperty("custom-int-5-not-within") private final Integer[] customInt5NotWithin; /** @@ -170,9 +555,17 @@ public class TaskQueryFilterCustomIntFields implements QueryParameterThis parameter can't be used together with 'custom-int-5-within'. */ + @Schema( + name = "custom-int-5-from", + description = + "Filter by lower bound of customInt5.

This parameter can't be used together with " + + "'custom-int-5-within'.") @JsonProperty("custom-int-5-from") private final Integer customInt5From; /** Exclude values from a lower bound of the field customInt5 of the Task. */ + @Schema( + name = "custom-int-5-from-not", + description = "Exclude values from a lower bound of the field customInt5 of the Task.") @JsonProperty("custom-int-5-from-not") private final Integer customInt5FromNot; /** @@ -180,22 +573,43 @@ public class TaskQueryFilterCustomIntFields implements QueryParameterThis parameter can't be used together with 'custom-int-5-within'. */ + @Schema( + name = "custom-int-5-to", + description = + "Filter by upper bound of customInt5.

This parameter can't be used together with " + + "'custom-int-5-within'.") @JsonProperty("custom-int-5-to") private final Integer customInt5To; /** Exclude values to an upper bound of the field customInt5 of the Task. */ + @Schema( + name = "custom-int-5-to-not", + description = "Exclude values to an upper bound of the field customInt5 of the Task.") @JsonProperty("custom-int-5-to-not") private final Integer customInt5ToNot; /** Filter by the value of the field customInt6 of the Task. This is an exact match. */ + @Schema( + name = "custom-int-6", + description = + "Filter by the value of the field customInt6 of the Task. This is an exact match.") @JsonProperty("custom-int-6") private final Integer[] customInt6In; /** Exclude values of the field customInt6 of the Task. */ + @Schema( + name = "custom-int-6-not", + description = "Exclude values of the field customInt6 of the Task.") @JsonProperty("custom-int-6-not") private final Integer[] customInt6NotIn; /** Filter by the range of value of the field customInt6 of the Task. */ + @Schema( + name = "custom-int-6-within", + description = "Filter by the range of value of the field customInt6 of the Task.") @JsonProperty("custom-int-6-within") private final Integer[] customInt6Within; /** Exclude range of values of the field customInt6 of the Task. */ + @Schema( + name = "custom-int-6-not-within", + description = "Exclude range of values of the field customInt6 of the Task.") @JsonProperty("custom-int-6-not-within") private final Integer[] customInt6NotWithin; /** @@ -203,9 +617,17 @@ public class TaskQueryFilterCustomIntFields implements QueryParameterThis parameter can't be used together with 'custom-int-6-within'. */ + @Schema( + name = "custom-int-6-from", + description = + "Filter by lower bound of customInt6.

This parameter can't be used together with " + + "'custom-int-6-within'.") @JsonProperty("custom-int-6-from") private final Integer customInt6From; /** Exclude values from a lower bound of the field customInt6 of the Task. */ + @Schema( + name = "custom-int-6-from-not", + description = "Exclude values from a lower bound of the field customInt6 of the Task.") @JsonProperty("custom-int-6-from-not") private final Integer customInt6FromNot; /** @@ -213,22 +635,43 @@ public class TaskQueryFilterCustomIntFields implements QueryParameterThis parameter can't be used together with 'custom-int-6-within'. */ + @Schema( + name = "custom-int-6-to", + description = + "Filter by upper bound of customInt6.

This parameter can't be used together with " + + "'custom-int-6-within'.") @JsonProperty("custom-int-6-to") private final Integer customInt6To; /** Exclude values to an upper bound of the field customInt6 of the Task. */ + @Schema( + name = "custom-int-6-to-not", + description = "Exclude values to an upper bound of the field customInt6 of the Task.") @JsonProperty("custom-int-6-to-not") private final Integer customInt6ToNot; /** Filter by the value of the field customInt7 of the Task. This is an exact match. */ + @Schema( + name = "custom-int-7", + description = + "Filter by the value of the field customInt7 of the Task. This is an exact match.") @JsonProperty("custom-int-7") private final Integer[] customInt7In; /** Exclude values of the field customInt7 of the Task. */ + @Schema( + name = "custom-int-7-not", + description = "Exclude values of the field customInt7 of the Task.") @JsonProperty("custom-int-7-not") private final Integer[] customInt7NotIn; /** Filter by the range of value of the field customInt7 of the Task. */ + @Schema( + name = "custom-int-7-within", + description = "Filter by the range of value of the field customInt7 of the Task.") @JsonProperty("custom-int-7-within") private final Integer[] customInt7Within; /** Exclude range of values of the field customInt7 of the Task. */ + @Schema( + name = "custom-int-7-not-within", + description = "Exclude range of values of the field customInt7 of the Task.") @JsonProperty("custom-int-7-not-within") private final Integer[] customInt7NotWithin; /** @@ -236,9 +679,17 @@ public class TaskQueryFilterCustomIntFields implements QueryParameterThis parameter can't be used together with 'custom-int-7-within'. */ + @Schema( + name = "custom-int-7-from", + description = + "Filter by lower bound of customInt7.

This parameter can't be used together with " + + "'custom-int-7-within'.") @JsonProperty("custom-int-7-from") private final Integer customInt7From; /** Exclude values from a lower bound of the field customInt7 of the Task. */ + @Schema( + name = "custom-int-7-from-not", + description = "Exclude values from a lower bound of the field customInt7 of the Task.") @JsonProperty("custom-int-7-from-not") private final Integer customInt7FromNot; /** @@ -246,22 +697,43 @@ public class TaskQueryFilterCustomIntFields implements QueryParameterThis parameter can't be used together with 'custom-int-7-within'. */ + @Schema( + name = "custom-int-7-to", + description = + "Filter by upper bound of customInt7.

This parameter can't be used together with " + + "'custom-int-7-within'.") @JsonProperty("custom-int-7-to") private final Integer customInt7To; /** Exclude values to an upper bound of the field customInt7 of the Task. */ + @Schema( + name = "custom-int-7-to-not", + description = "Exclude values to an upper bound of the field customInt7 of the Task.") @JsonProperty("custom-int-7-to-not") private final Integer customInt7ToNot; /** Filter by the value of the field customInt8 of the Task. This is an exact match. */ + @Schema( + name = "custom-int-8", + description = + "Filter by the value of the field customInt8 of the Task. This is an exact match.") @JsonProperty("custom-int-8") private final Integer[] customInt8In; /** Exclude values of the field customInt8 of the Task. */ + @Schema( + name = "custom-int-8-not", + description = "Exclude values of the field customInt8 of the Task.") @JsonProperty("custom-int-8-not") private final Integer[] customInt8NotIn; /** Filter by the range of value of the field customInt8 of the Task. */ + @Schema( + name = "custom-int-8-within", + description = "Filter by the range of value of the field customInt8 of the Task.") @JsonProperty("custom-int-8-within") private final Integer[] customInt8Within; /** Exclude range of values of the field customInt8 of the Task. */ + @Schema( + name = "custom-int-8-not-within", + description = "Exclude range of values of the field customInt8 of the Task.") @JsonProperty("custom-int-8-not-within") private final Integer[] customInt8NotWithin; /** @@ -269,9 +741,17 @@ public class TaskQueryFilterCustomIntFields implements QueryParameterThis parameter can't be used together with 'custom-int-8-within'. */ + @Schema( + name = "custom-int-8-from", + description = + "Filter by lower bound of customInt8.

This parameter can't be used together with " + + "'custom-int-8-within'.") @JsonProperty("custom-int-8-from") private final Integer customInt8From; /** Exclude values from a lower bound of the field customInt8 of the Task. */ + @Schema( + name = "custom-int-8-from-not", + description = "Exclude values from a lower bound of the field customInt8 of the Task.") @JsonProperty("custom-int-8-from-not") private final Integer customInt8FromNot; /** @@ -279,9 +759,17 @@ public class TaskQueryFilterCustomIntFields implements QueryParameterThis parameter can't be used together with 'custom-int-8-within'. */ + @Schema( + name = "custom-int-8-to", + description = + "Filter by upper bound of customInt8.

This parameter can't be used together with " + + "'custom-int-8-within'.") @JsonProperty("custom-int-8-to") private final Integer customInt8To; /** Exclude values to an upper bound of the field customInt8 of the Task. */ + @Schema( + name = "custom-int-8-to-not", + description = "Exclude values to an upper bound of the field customInt8 of the Task.") @JsonProperty("custom-int-8-to-not") private final Integer customInt8ToNot; diff --git a/rest/taskana-rest-spring/src/main/java/pro/taskana/task/rest/TaskQueryFilterParameter.java b/rest/taskana-rest-spring/src/main/java/pro/taskana/task/rest/TaskQueryFilterParameter.java index c1af19acbe..7124cc5d2d 100644 --- a/rest/taskana-rest-spring/src/main/java/pro/taskana/task/rest/TaskQueryFilterParameter.java +++ b/rest/taskana-rest-spring/src/main/java/pro/taskana/task/rest/TaskQueryFilterParameter.java @@ -1,6 +1,7 @@ package pro.taskana.task.rest; import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.beans.ConstructorProperties; import java.time.Instant; import java.util.ArrayList; @@ -20,21 +21,652 @@ public class TaskQueryFilterParameter implements QueryParameter { + public String[] getTaskIdIn() { + return taskIdIn; + } + + public String[] getExternalIdIn() { + return externalIdIn; + } + + public String[] getExternalIdNotIn() { + return externalIdNotIn; + } + + public Instant[] getReceivedWithin() { + return receivedWithin; + } + + public Instant getReceivedFrom() { + return receivedFrom; + } + + public Instant getReceivedUntil() { + return receivedUntil; + } + + public Instant[] getReceivedNotIn() { + return receivedNotIn; + } + + public Instant getReceivedFromNot() { + return receivedFromNot; + } + + public Instant getReceivedUntilNot() { + return receivedUntilNot; + } + + public Instant[] getCreatedWithin() { + return createdWithin; + } + + public Instant getCreatedFrom() { + return createdFrom; + } + + public Instant getCreatedUntil() { + return createdUntil; + } + + public Instant[] getCreatedNotWithin() { + return createdNotWithin; + } + + public Instant getCreatedFromNot() { + return createdFromNot; + } + + public Instant getCreatedUntilNot() { + return createdUntilNot; + } + + public Instant[] getClaimedWithin() { + return claimedWithin; + } + + public Instant[] getClaimedNotWithin() { + return claimedNotWithin; + } + + public Instant[] getModifiedWithin() { + return modifiedWithin; + } + + public Instant[] getModifiedNotWithin() { + return modifiedNotWithin; + } + + public Instant[] getPlannedWithin() { + return plannedWithin; + } + + public Instant getPlannedFrom() { + return plannedFrom; + } + + public Instant getPlannedUntil() { + return plannedUntil; + } + + public Instant[] getPlannedNotWithin() { + return plannedNotWithin; + } + + public Instant getPlannedFromNot() { + return plannedFromNot; + } + + public Instant getPlannedUntilNot() { + return plannedUntilNot; + } + + public Instant[] getDueWithin() { + return dueWithin; + } + + public Instant getDueFrom() { + return dueFrom; + } + + public Instant getDueUntil() { + return dueUntil; + } + + public Instant[] getDueNotWithin() { + return dueNotWithin; + } + + public Instant getDueFromNot() { + return dueFromNot; + } + + public Instant getDueUntilNot() { + return dueUntilNot; + } + + public Instant[] getCompletedWithin() { + return completedWithin; + } + + public Instant getCompletedFrom() { + return completedFrom; + } + + public Instant getCompletedUntil() { + return completedUntil; + } + + public Instant[] getCompletedNotWithin() { + return completedNotWithin; + } + + public Instant getCompletedFromNot() { + return completedFromNot; + } + + public Instant getCompletedUntilNot() { + return completedUntilNot; + } + + public String[] getNameIn() { + return nameIn; + } + + public String[] getNameNotIn() { + return nameNotIn; + } + + public String[] getNameLike() { + return nameLike; + } + + public String[] getNameNotLike() { + return nameNotLike; + } + + public String[] getCreatorIn() { + return creatorIn; + } + + public String[] getCreatorNotIn() { + return creatorNotIn; + } + + public String[] getCreatorLike() { + return creatorLike; + } + + public String[] getCreatorNotLike() { + return creatorNotLike; + } + + public String[] getNoteLike() { + return noteLike; + } + + public String[] getNoteNotLike() { + return noteNotLike; + } + + public String[] getDescriptionLike() { + return descriptionLike; + } + + public String[] getDescriptionNotLike() { + return descriptionNotLike; + } + + public int[] getPriorityIn() { + return priorityIn; + } + + public int[] getPriorityNotIn() { + return priorityNotIn; + } + + public Integer[] getPriorityWithin() { + return priorityWithin; + } + + public Integer getPriorityFrom() { + return priorityFrom; + } + + public Integer getPriorityUntil() { + return priorityUntil; + } + + public Integer[] getPriorityNotWithin() { + return priorityNotWithin; + } + + public Integer getPriorityNotFrom() { + return priorityNotFrom; + } + + public Integer getPriorityNotUntil() { + return priorityNotUntil; + } + + public TaskState[] getStateIn() { + return stateIn; + } + + public TaskState[] getStateNotIn() { + return stateNotIn; + } + + public String[] getClassificationIdIn() { + return classificationIdIn; + } + + public String[] getClassificationIdNotIn() { + return classificationIdNotIn; + } + + public String[] getClassificationKeyIn() { + return classificationKeyIn; + } + + public String[] getClassificationKeyNotIn() { + return classificationKeyNotIn; + } + + public String[] getClassificationKeyLike() { + return classificationKeyLike; + } + + public String[] getClassificationKeyNotLike() { + return classificationKeyNotLike; + } + + public String[] getClassificationParentKeyIn() { + return classificationParentKeyIn; + } + + public String[] getClassificationParentKeyNotIn() { + return classificationParentKeyNotIn; + } + + public String[] getClassificationParentKeyLike() { + return classificationParentKeyLike; + } + + public String[] getClassificationParentKeyNotLike() { + return classificationParentKeyNotLike; + } + + public String[] getClassificationCategoryIn() { + return classificationCategoryIn; + } + + public String[] getClassificationCategoryNotIn() { + return classificationCategoryNotIn; + } + + public String[] getClassificationCategoryLike() { + return classificationCategoryLike; + } + + public String[] getClassificationCategoryNotLike() { + return classificationCategoryNotLike; + } + + public String[] getClassificationNameIn() { + return classificationNameIn; + } + + public String[] getClassificationNameNotIn() { + return classificationNameNotIn; + } + + public String[] getClassificationNameLike() { + return classificationNameLike; + } + + public String[] getClassificationNameNotLike() { + return classificationNameNotLike; + } + + public String[] getWorkbasketIdIn() { + return workbasketIdIn; + } + + public String[] getWorkbasketIdNotIn() { + return workbasketIdNotIn; + } + + public String[] getWorkbasketKeyIn() { + return workbasketKeyIn; + } + + public String[] getWorkbasketKeyNotIn() { + return workbasketKeyNotIn; + } + + public String getDomain() { + return domain; + } + + public String[] getBusinessProcessIdIn() { + return businessProcessIdIn; + } + + public String[] getBusinessProcessIdNot() { + return businessProcessIdNot; + } + + public String[] getBusinessProcessIdLike() { + return businessProcessIdLike; + } + + public String[] getBusinessProcessIdNotLike() { + return businessProcessIdNotLike; + } + + public String[] getParentBusinessProcessIdIn() { + return parentBusinessProcessIdIn; + } + + public String[] getParentBusinessProcessIdNotIn() { + return parentBusinessProcessIdNotIn; + } + + public String[] getParentBusinessProcessIdLike() { + return parentBusinessProcessIdLike; + } + + public String[] getParentBusinessProcessIdNotLike() { + return parentBusinessProcessIdNotLike; + } + + public String[] getOwnerIn() { + return ownerIn; + } + + public String[] getOwnerNotIn() { + return ownerNotIn; + } + + public String[] getOwnerLike() { + return ownerLike; + } + + public String[] getOwnerNotLike() { + return ownerNotLike; + } + + public String getOwnerNull() { + return ownerNull; + } + + public ObjectReference[] getPrimaryObjectReferenceIn() { + return primaryObjectReferenceIn; + } + + public String[] getPorCompanyIn() { + return porCompanyIn; + } + + public String[] getPorCompanyNotIn() { + return porCompanyNotIn; + } + + public String[] getPorCompanyLike() { + return porCompanyLike; + } + + public String[] getPorCompanyNotLike() { + return porCompanyNotLike; + } + + public String[] getPorSystemIn() { + return porSystemIn; + } + + public String[] getPorSystemNotIn() { + return porSystemNotIn; + } + + public String[] getPorSystemLike() { + return porSystemLike; + } + + public String[] getPorSystemNotLike() { + return porSystemNotLike; + } + + public String[] getPorInstanceIn() { + return porInstanceIn; + } + + public String[] getPorInstanceNotIn() { + return porInstanceNotIn; + } + + public String[] getPorInstanceLike() { + return porInstanceLike; + } + + public String[] getPorInstanceNotLike() { + return porInstanceNotLike; + } + + public String[] getPorTypeIn() { + return porTypeIn; + } + + public String[] getPorTypeNotIn() { + return porTypeNotIn; + } + + public String[] getPorTypeLike() { + return porTypeLike; + } + + public String[] getPorTypeNotLike() { + return porTypeNotLike; + } + + public String[] getPorValueIn() { + return porValueIn; + } + + public String[] getPorValueNotIn() { + return porValueNotIn; + } + + public String[] getPorValueLike() { + return porValueLike; + } + + public String[] getPorValueNotLike() { + return porValueNotLike; + } + + public ObjectReference[] getSecondaryObjectReferenceIn() { + return secondaryObjectReferenceIn; + } + + public String[] getSorCompanyIn() { + return sorCompanyIn; + } + + public String[] getSorCompanyLike() { + return sorCompanyLike; + } + + public String[] getSorSystemIn() { + return sorSystemIn; + } + + public String[] getSorSystemLike() { + return sorSystemLike; + } + + public String[] getSorInstanceIn() { + return sorInstanceIn; + } + + public String[] getSorInstanceLike() { + return sorInstanceLike; + } + + public String[] getSorTypeIn() { + return sorTypeIn; + } + + public String[] getSorTypeLike() { + return sorTypeLike; + } + + public String[] getSorValueIn() { + return sorValueIn; + } + + public String[] getSorValueLike() { + return sorValueLike; + } + + public Boolean getRead() { + return isRead; + } + + public Boolean getTransferred() { + return isTransferred; + } + + public String[] getAttachmentClassificationIdIn() { + return attachmentClassificationIdIn; + } + + public String[] getAttachmentClassificationIdNotIn() { + return attachmentClassificationIdNotIn; + } + + public String[] getAttachmentClassificationKeyIn() { + return attachmentClassificationKeyIn; + } + + public String[] getAttachmentClassificationKeyNotIn() { + return attachmentClassificationKeyNotIn; + } + + public String[] getAttachmentClassificationKeyLike() { + return attachmentClassificationKeyLike; + } + + public String[] getAttachmentClassificationKeyNotLike() { + return attachmentClassificationKeyNotLike; + } + + public String[] getAttachmentClassificationNameIn() { + return attachmentClassificationNameIn; + } + + public String[] getAttachmentClassificationNameNotIn() { + return attachmentClassificationNameNotIn; + } + + public String[] getAttachmentClassificationNameLike() { + return attachmentClassificationNameLike; + } + + public String[] getAttachmentClassificationNameNotLike() { + return attachmentClassificationNameNotLike; + } + + public String[] getAttachmentChannelIn() { + return attachmentChannelIn; + } + + public String[] getAttachmentChannelNotIn() { + return attachmentChannelNotIn; + } + + public String[] getAttachmentChannelLike() { + return attachmentChannelLike; + } + + public String[] getAttachmentChannelNotLike() { + return attachmentChannelNotLike; + } + + public String[] getAttachmentReferenceIn() { + return attachmentReferenceIn; + } + + public String[] getAttachmentReferenceNotIn() { + return attachmentReferenceNotIn; + } + + public String[] getAttachmentReferenceLike() { + return attachmentReferenceLike; + } + + public String[] getAttachmentReferenceNotLike() { + return attachmentReferenceNotLike; + } + + public Instant[] getAttachmentReceivedWithin() { + return attachmentReceivedWithin; + } + + public Instant[] getAttachmentReceivedNotWithin() { + return attachmentReceivedNotWithin; + } + + public Boolean getWithoutAttachment() { + return withoutAttachment; + } + + public CallbackState[] getCallbackStateIn() { + return callbackStateIn; + } + + public CallbackState[] getCallbackStateNotIn() { + return callbackStateNotIn; + } + + public WildcardSearchField[] getWildcardSearchFieldIn() { + return wildcardSearchFieldIn; + } + + public String getWildcardSearchValue() { + return wildcardSearchValue; + } + + public String[] getTaskIdNotIn() { + return taskIdNotIn; + } + // region id /** Filter by task id. This is an exact match. */ + @Schema(name = "task-id", description = "Filter by task id. This is an exact match.") @JsonProperty("task-id") private final String[] taskIdIn; /** Filter by what the task id shouldn't be. This is an exact match. */ + @Schema( + name = "task-id-not", + description = "Filter by what the task id shouldn't be. This is an exact match.") @JsonProperty("task-id-not") private final String[] taskIdNotIn; // endregion // region externalId /** Filter by the external id of the Task. This is an exact match. */ + @Schema( + name = "external-id", + description = "Filter by the external id of the Task. This is an exact match.") @JsonProperty("external-id") private final String[] externalIdIn; /** Filter by what the external id of the Task shouldn't be. This is an exact match. */ + @Schema( + name = "external-id-not", + description = + "Filter by what the external id of the Task shouldn't be. This is an exact match.") @JsonProperty("external-id-not") private final String[] externalIdNotIn; // endregion @@ -47,6 +679,12 @@ public class TaskQueryFilterParameter implements QueryParameter * *

This parameter can't be used together with 'received-from' or 'received-until'. */ + @Schema( + name = "received", + description = + "Filter by a time interval within which the Task was received. To create an open " + + "interval you can just leave it blank.

The format is ISO-8601.

This " + + "parameter can't be used together with 'received-from' or 'received-until'.") @JsonProperty("received") private final Instant[] receivedWithin; @@ -57,6 +695,11 @@ public class TaskQueryFilterParameter implements QueryParameter * *

This parameter can't be used together with 'received'. */ + @Schema( + name = "receivedFrom", + description = + "Filter since a given received timestamp.

The format is ISO-8601." + + "

This parameter can't be used together with 'received'.") @JsonProperty("received-from") private final Instant receivedFrom; @@ -67,6 +710,11 @@ public class TaskQueryFilterParameter implements QueryParameter * *

This parameter can't be used together with 'received'. */ + @Schema( + name = "received-until", + description = + "Filter until a given received timestamp.

The format is ISO-8601." + + "

This parameter can't be used together with 'received'.") @JsonProperty("received-until") private final Instant receivedUntil; @@ -79,6 +727,13 @@ public class TaskQueryFilterParameter implements QueryParameter *

This parameter can't be used together with 'received-not-in-from' or * 'received-not-in-until'. */ + @Schema( + name = "received-not", + description = + "Filter by a time interval within which the Task wasn't received. To " + + "create an open interval you can just leave it blank.

The format is ISO-8601." + + "

This parameter can't be used together with 'received-not-in-from' or " + + "'received-not-in-until'.") @JsonProperty("received-not") private final Instant[] receivedNotIn; @@ -89,6 +744,11 @@ public class TaskQueryFilterParameter implements QueryParameter * *

This parameter can't be used together with 'received-not-in'. */ + @Schema( + name = "received-from-not", + description = + "Filter since a given timestamp where it wasn't received.

The format is " + + "ISO-8601.

This parameter can't be used together with 'received-not-in'.") @JsonProperty("received-from-not") private final Instant receivedFromNot; @@ -99,6 +759,11 @@ public class TaskQueryFilterParameter implements QueryParameter * *

This parameter can't be used together with 'received-not-in'. */ + @Schema( + name = "received-until-not", + description = + "Filter until a given timestamp where it wasn't received.

The format is " + + "ISO-8601.

This parameter can't be used together with 'received-not-in'.") @JsonProperty("received-until-not") private final Instant receivedUntilNot; // endregion @@ -111,6 +776,12 @@ public class TaskQueryFilterParameter implements QueryParameter * *

This parameter can't be used together with 'created-from' or 'created-until'. */ + @Schema( + name = "created", + description = + "Filter by a time interval within which the Task was created. To create an open " + + "interval you can just leave it blank.

The format is ISO-8601.

This " + + "parameter can't be used together with 'created-from' or 'created-until'.") @JsonProperty("created") private final Instant[] createdWithin; @@ -121,6 +792,11 @@ public class TaskQueryFilterParameter implements QueryParameter * *

This parameter can't be used together with 'created'. */ + @Schema( + name = "created-from", + description = + "Filter since a given created timestamp.

The format is ISO-8601.

This parameter " + + "can't be used together with 'created'.") @JsonProperty("created-from") private final Instant createdFrom; @@ -131,6 +807,11 @@ public class TaskQueryFilterParameter implements QueryParameter * *

This parameter can't be used together with 'created'. */ + @Schema( + name = "created-until", + description = + "Filter until a given created timestamp.

The format is ISO-8601.

This parameter " + + "can't be used together with 'created'.") @JsonProperty("created-until") private final Instant createdUntil; @@ -142,6 +823,13 @@ public class TaskQueryFilterParameter implements QueryParameter * *

This parameter can't be used together with 'created-not-in-from' or 'created-not-in-until'. */ + @Schema( + name = "created-not", + description = + "Filter by a time interval within which the Task wasn't created. To create an open " + + "interval you can just leave it blank.

The format is ISO-8601.

This " + + "parameter can't be used together with 'created-not-in-from' or " + + "'created-not-in-until'.") @JsonProperty("created-not") private final Instant[] createdNotWithin; @@ -152,6 +840,11 @@ public class TaskQueryFilterParameter implements QueryParameter * *

This parameter can't be used together with 'created-not-in'. */ + @Schema( + name = "created-from-not", + description = + "Filter not since a given timestamp where it wasn't created.

The format is ISO-8601." + + "

This parameter can't be used together with 'created-not-in'.") @JsonProperty("created-from-not") private final Instant createdFromNot; @@ -162,6 +855,11 @@ public class TaskQueryFilterParameter implements QueryParameter * *

This parameter can't be used together with 'created-not-in'. */ + @Schema( + name = "created-until-not", + description = + "Filter not until a given timestamp where it wasn't created.

The format is ISO-8601." + + "

This parameter can't be used together with 'created-not-in'.") @JsonProperty("created-until-not") private final Instant createdUntilNot; // endregion @@ -172,6 +870,11 @@ public class TaskQueryFilterParameter implements QueryParameter * *

The format is ISO-8601. */ + @Schema( + name = "claimed", + description = + "Filter by a time interval within which the Task was claimed. To create an open " + + "interval you can just leave it blank.

The format is ISO-8601.") @JsonProperty("claimed") private final Instant[] claimedWithin; @@ -181,6 +884,11 @@ public class TaskQueryFilterParameter implements QueryParameter * *

The format is ISO-8601. */ + @Schema( + name = "claimed-not", + description = + "Filter by a time interval within which the Task wasn't claimed. To create an open " + + "interval you can just leave it blank.

The format is ISO-8601.") @JsonProperty("claimed-not") private final Instant[] claimedNotWithin; // endregion @@ -191,6 +899,11 @@ public class TaskQueryFilterParameter implements QueryParameter * *

The format is ISO-8601. */ + @Schema( + name = "modified", + description = + "Filter by a time interval within which the Task was modified. To create an open " + + "interval you can just leave it blank.

The format is ISO-8601.") @JsonProperty("modified") private final Instant[] modifiedWithin; @@ -200,6 +913,11 @@ public class TaskQueryFilterParameter implements QueryParameter * *

The format is ISO-8601. */ + @Schema( + name = "modified-not", + description = + "Filter by a time interval within which the Task wasn't modified. To create an open " + + "interval you can just leave it blank.

The format is ISO-8601.") @JsonProperty("modified-not") private final Instant[] modifiedNotWithin; // endregion @@ -212,6 +930,12 @@ public class TaskQueryFilterParameter implements QueryParameter * *

This parameter can't be used together with 'planned-from' or 'planned-until'. */ + @Schema( + name = "planned", + description = + "Filter by a time interval within which the Task was planned. To create an open " + + "interval you can just leave it blank.

The format is ISO-8601.

This " + + "parameter can't be used together with 'planned-from' or 'planned-until'.") @JsonProperty("planned") private final Instant[] plannedWithin; @@ -222,6 +946,11 @@ public class TaskQueryFilterParameter implements QueryParameter * *

This parameter can't be used together with 'planned'. */ + @Schema( + name = "planned-from", + description = + "Filter since a given planned timestamp.

The format is ISO-8601.

This parameter " + + "can't be used together with 'planned'.") @JsonProperty("planned-from") private final Instant plannedFrom; @@ -232,6 +961,11 @@ public class TaskQueryFilterParameter implements QueryParameter * *

This parameter can't be used together with 'planned'. */ + @Schema( + name = "planned-until", + description = + "Filter until a given planned timestamp.

The format is ISO-8601.

This parameter " + + "can't be used together with 'planned'.") @JsonProperty("planned-until") private final Instant plannedUntil; @@ -243,6 +977,13 @@ public class TaskQueryFilterParameter implements QueryParameter * *

This parameter can't be used together with 'planned-not-in-from' or 'planned-not-in-until'. */ + @Schema( + name = "planned-not", + description = + "Filter by a time interval within which the Task was planned. To create an open " + + "interval you can just leave it blank.

The format is ISO-8601.

This " + + "parameter can't be used together with 'planned-not-in-from' or " + + "'planned-not-in-until'.") @JsonProperty("planned-not") private final Instant[] plannedNotWithin; @@ -253,6 +994,11 @@ public class TaskQueryFilterParameter implements QueryParameter * *

This parameter can't be used together with 'planned-not-in'. */ + @Schema( + name = "planned-from-not", + description = + "Filter since a given timestamp where it wasn't planned.

The format is ISO-8601." + + "

This parameter can't be used together with 'planned-not-in'.") @JsonProperty("planned-from-not") private final Instant plannedFromNot; @@ -263,6 +1009,11 @@ public class TaskQueryFilterParameter implements QueryParameter * *

This parameter can't be used together with 'planned-not-in'. */ + @Schema( + name = "planned-until-not", + description = + "Filter until a given timestamp where it wasn't planned.

The format is ISO-8601." + + "

This parameter can't be used together with 'planned-not-in'.") @JsonProperty("planned-until-not") private final Instant plannedUntilNot; // endregion @@ -275,7 +1026,13 @@ public class TaskQueryFilterParameter implements QueryParameter * *

This parameter can't be used together with 'due-from' or 'due-until'. */ - @JsonProperty("due") + @Schema( + name = "due", + description = + "Filter by a time interval within which the Task was due. To create an open interval " + + "you can just leave it blank.

The format is ISO-8601.

This parameter can't be" + + " used together with 'due-from' or 'due-until'.") + @JsonProperty("ued") private final Instant[] dueWithin; /** @@ -285,6 +1042,11 @@ public class TaskQueryFilterParameter implements QueryParameter * *

This parameter can't be used together with 'due'. */ + @Schema( + name = "due-from", + description = + "Filter since a given due timestamp.

The format is ISO-8601.

This parameter can't " + + "be used together with 'due'.") @JsonProperty("due-from") private final Instant dueFrom; @@ -295,6 +1057,11 @@ public class TaskQueryFilterParameter implements QueryParameter * *

This parameter can't be used together with 'due'. */ + @Schema( + name = "due-until", + description = + "Filter until a given due timestamp.

The format is ISO-8601.

This parameter can't " + + "be used together with 'due'.") @JsonProperty("due-until") private final Instant dueUntil; @@ -306,6 +1073,12 @@ public class TaskQueryFilterParameter implements QueryParameter * *

This parameter can't be used together with 'due-not-in-from' or 'due-not-in-until'. */ + @Schema( + name = "due-not", + description = + "Filter by a time interval within which the Task wasn't due. To create an open interval" + + " you can just leave it blank.

The format is ISO-8601.

This parameter can't be" + + " used together with 'due-not-in-from' or 'due-not-in-until'.") @JsonProperty("due-not") private final Instant[] dueNotWithin; @@ -316,6 +1089,11 @@ public class TaskQueryFilterParameter implements QueryParameter * *

This parameter can't be used together with 'due-not-in'. */ + @Schema( + name = "due-from-not", + description = + "Filter since a given timestamp where it isn't due.

The format is ISO-8601.

This " + + "parameter can't be used together with 'due-not-in'.") @JsonProperty("due-from-not") private final Instant dueFromNot; @@ -326,6 +1104,11 @@ public class TaskQueryFilterParameter implements QueryParameter * *

This parameter can't be used together with 'due-not-in'. */ + @Schema( + name = "due-until-not", + description = + "Filter until a given timestamp where it isn't due.

The format is ISO-8601.

This " + + "parameter can't be used together with 'due-not-in'.") @JsonProperty("due-until-not") private final Instant dueUntilNot; // endregion @@ -338,6 +1121,12 @@ public class TaskQueryFilterParameter implements QueryParameter * *

This parameter can't be used together with 'completed-from' or 'completed-until'. */ + @Schema( + name = "completed", + description = + "Filter by a time interval within which the Task was completed. To create an open " + + "interval you can just leave it blank.

The format is ISO-8601.

This parameter" + + " can't be used together with 'completed-from' or 'completed-until'.") @JsonProperty("completed") private final Instant[] completedWithin; @@ -348,6 +1137,11 @@ public class TaskQueryFilterParameter implements QueryParameter * *

This parameter can't be used together with 'completed'. */ + @Schema( + name = "completed-from", + description = + "Filter since a given completed timestamp.

The format is ISO-8601.

This parameter " + + "can't be used together with 'completed'.") @JsonProperty("completed-from") private final Instant completedFrom; @@ -358,6 +1152,11 @@ public class TaskQueryFilterParameter implements QueryParameter * *

This parameter can't be used together with 'completed'. */ + @Schema( + name = "completed-until", + description = + "Filter until a given completed timestamp.

The format is ISO-8601.

This parameter " + + "can't be used together with 'completed'.") @JsonProperty("completed-until") private final Instant completedUntil; @@ -370,6 +1169,12 @@ public class TaskQueryFilterParameter implements QueryParameter *

This parameter can't be used together with 'completed-not-in-from' or * 'completed-not-in-until'. */ + @Schema( + name = "completed-not", + description = + "Filter by a time interval within which the Task wasn't completed. To create an open " + + "interval you can just leave it blank.

The format is ISO-8601.

This parameter " + + "can't be used together with 'completed-not-in-from' or 'completed-not-in-until'.") @JsonProperty("completed-not") private final Instant[] completedNotWithin; @@ -380,6 +1185,11 @@ public class TaskQueryFilterParameter implements QueryParameter * *

This parameter can't be used together with 'completed-not-in'. */ + @Schema( + name = "completed-from-not", + description = + "Filter since a given timestamp where it wasn't completed.

The format is ISO-8601. " + + "

This parameter can't be used together with 'completed-not-in'.") @JsonProperty("completed-from-not") private final Instant completedFromNot; @@ -390,15 +1200,24 @@ public class TaskQueryFilterParameter implements QueryParameter * *

This parameter can't be used together with 'completed-not-in'. */ + @Schema( + name = "completed-until-not", + description = + "Filter until a given timestamp where it wasn't completed.

The format is ISO-8601. " + + "

This parameter can't be used together with 'completed-not-in'.") @JsonProperty("completed-until-not") private final Instant completedUntilNot; // endregion // region name /** Filter by the name of the Task. This is an exact match. */ + @Schema(name = "name", description = "Filter by the name of the Task. This is an exact match.") @JsonProperty("name") private final String[] nameIn; /** Filter by what the name of the Task shouldn't be. This is an exact match. */ + @Schema( + name = "name-not", + description = "Filter by what the name of the Task shouldn't be. This is an exact match.") @JsonProperty("name-not") private final String[] nameNotIn; @@ -407,6 +1226,12 @@ public class TaskQueryFilterParameter implements QueryParameter * and end of the requested value). Further SQL "LIKE" wildcard characters will be resolved * correctly. */ + @Schema( + name = "name-like", + description = + "Filter by the name of the Task. This results in a substring search (% is appended to " + + "the front and end of the requested value). Further SQL \"LIKE\" wildcard " + + "characters will be resolved correctly.") @JsonProperty("name-like") private final String[] nameLike; @@ -415,15 +1240,25 @@ public class TaskQueryFilterParameter implements QueryParameter * appended to the front and end of the requested value). Further SQL "LIKE" wildcard characters * will be resolved correctly. */ + @Schema( + name = "name-not-like", + description = + "Filter by what the name of the Task shouldn't be. This results in a substring search " + + "(% is appended to the front and end of the requested value). Further SQL " + + "\"LIKE\" wildcard characters will be resolved correctly.") @JsonProperty("name-not-like") private final String[] nameNotLike; // endregion // region creator /** Filter by creator of the Task. This is an exact match. */ + @Schema(name = "creator", description = "Filter by creator of the Task. This is an exact match.") @JsonProperty("creator") private final String[] creatorIn; /** Filter by what the creator of the Task shouldn't be. This is an exact match. */ + @Schema( + name = "creator-not", + description = "Filter by what the creator of the Task shouldn't be. This is an exact match.") @JsonProperty("creator-not") private final String[] creatorNotIn; @@ -432,6 +1267,12 @@ public class TaskQueryFilterParameter implements QueryParameter * front and end of the requested value). Further SQL "LIKE" wildcard characters will be resolved * correctly. */ + @Schema( + name = "creator-like", + description = + "Filter by the creator of the Task. This results in a substring search (% is appended to" + + " the front and end of the requested value). Further SQL \"LIKE\" wildcard " + + "characters will be resolved correctly.") @JsonProperty("creator-like") private final String[] creatorLike; @@ -440,6 +1281,12 @@ public class TaskQueryFilterParameter implements QueryParameter * appended to the front and end of the requested value). Further SQL "LIKE" wildcard characters * will be resolved correctly. */ + @Schema( + name = "creator-not-like", + description = + "Filter by what the creator of the Task shouldn't be. This results in a substring " + + "search (% is appended to the front and end of the requested value). Further SQL " + + "\"LIKE\" wildcard characters will be resolved correctly.") @JsonProperty("creator-not-like") private final String[] creatorNotLike; // endregion @@ -449,6 +1296,12 @@ public class TaskQueryFilterParameter implements QueryParameter * and end of the requested value). Further SQL "LIKE" wildcard characters will be resolved * correctly. */ + @Schema( + name = "note-like", + description = + "Filter by the note of the Task. This results in a substring search (% is appended to" + + " the front and end of the requested value). Further SQL \"LIKE\" wildcard " + + "characters will be resolved correctly.") @JsonProperty("note-like") private final String[] noteLike; @@ -457,6 +1310,12 @@ public class TaskQueryFilterParameter implements QueryParameter * appended to the front and end of the requested value). Further SQL "LIKE" wildcard characters * will be resolved correctly. */ + @Schema( + name = "note-not-like", + description = + "Filter by what the note of the Task shouldn't be. This results in a substring search " + + "(% is appended to the front and end of the requested value). Further SQL \"LIKE\"" + + " wildcard characters will be resolved correctly.") @JsonProperty("note-not-like") private final String[] noteNotLike; // endregion @@ -466,6 +1325,12 @@ public class TaskQueryFilterParameter implements QueryParameter * front and end of the requested value). Further SQL "LIKE" wildcard characters will be resolved * correctly. */ + @Schema( + name = "description-like", + description = + "Filter by the description of the Task. This results in a substring search (% is " + + "appended to the front and end of the requested value). Further SQL \"LIKE\" " + + "wildcard characters will be resolved correctly.") @JsonProperty("description-like") private final String[] descriptionLike; @@ -474,66 +1339,113 @@ public class TaskQueryFilterParameter implements QueryParameter * is appended to the front and end of the requested value). Further SQL "LIKE" wildcard * characters will be resolved correctly. */ + @Schema( + name = "description-not-like", + description = + "Filter by what the description of the Task shouldn't be. This results in a substring " + + "search (% is appended to the front and end of the requested value). Further SQL " + + "\"LIKE\" wildcard characters will be resolved correctly.") @JsonProperty("description-not-like") private final String[] descriptionNotLike; // endregion // region priority /** Filter by the priority of the Task. This is an exact match. */ + @Schema( + name = "priority", + description = "Filter by the priority of the Task. This is an exact match.") @JsonProperty("priority") private final int[] priorityIn; /** Filter by what the priority of the Task shouldn't be. This is an exact match. */ + @Schema( + name = "priority-not", + description = "Filter by what the priority of the Task shouldn't be. This is an exact match.") @JsonProperty("priority-not") private final int[] priorityNotIn; /** Filter by the range of values of the priority field of the Task. */ + @Schema( + name = "priority-within", + description = "Filter by the range of values of the priority field of the Task.") @JsonProperty("priority-within") private final Integer[] priorityWithin; /** Filter by priority starting from the given value (inclusive). */ + @Schema( + name = "priority-from", + description = "Filter by priority starting from the given value (inclusive).") @JsonProperty("priority-from") private final Integer priorityFrom; /** Filter by priority up to the given value (inclusive). */ + @Schema( + name = "priority-until", + description = "Filter by priority up to the given value (inclusive).") @JsonProperty("priority-until") private final Integer priorityUntil; /** Filter by exclusing the range of values of the priority field of the Task. */ + @Schema( + name = "priority-not-within", + description = "Filter by exclusing the range of values of the priority field of the Task.") @JsonProperty("priority-not-within") private final Integer[] priorityNotWithin; /** Filter by excluding priority starting from the given value (inclusive). */ + @Schema( + name = "priority-not-from", + description = "Filter by excluding priority starting from the given value (inclusive).") @JsonProperty("priority-not-from") private final Integer priorityNotFrom; /** Filter by excluding priority up to the given value (inclusive). */ + @Schema( + name = "priority-not-until", + description = "Filter by excluding priority up to the given value (inclusive).") @JsonProperty("priority-not-until") private final Integer priorityNotUntil; // endregion // region state /** Filter by the Task state. This is an exact match. */ + @Schema(name = "state", description = "Filter by the Task state. This is an exact match.") @JsonProperty("state") private final TaskState[] stateIn; /** Filter by what the Task state shouldn't be. This is an exact match. */ + @Schema( + name = "state-not", + description = "Filter by what the Task state shouldn't be. This is an exact match.") @JsonProperty("state-not") private final TaskState[] stateNotIn; // endregion // region classificationId /** Filter by the classification id of the Task. This is an exact match. */ + @Schema( + name = "classification-id", + description = "Filter by the classification id of the Task. This is an exact match.") @JsonProperty("classification-id") private final String[] classificationIdIn; /** Filter by what the classification id of the Task shouldn't be. This is an exact match. */ + @Schema( + name = "classification-id-not", + description = + "Filter by what the classification id of the Task shouldn't be. This is an exact match.") @JsonProperty("classification-id-not") private final String[] classificationIdNotIn; // endregion // region classificationKey /** Filter by the classification key of the Task. This is an exact match. */ + @Schema( + name = "classification-key", + description = "Filter by the classification key of the Task. This is an exact match.") @JsonProperty("classification-key") private final String[] classificationKeyIn; /** Filter by the classification key of the Task. This is an exact match. */ + @Schema( + name = "classification-key-not", + description = "Filter by the classification key of the Task. This is an exact match.") @JsonProperty("classification-key-not") private final String[] classificationKeyNotIn; @@ -542,6 +1454,12 @@ public class TaskQueryFilterParameter implements QueryParameter * to the front and end of the requested value). Further SQL "LIKE" wildcard characters will be * resolved correctly. */ + @Schema( + name = "classification-key-like", + description = + "Filter by the classification key of the Task. This results in a substring search (% is" + + " appended to the front and end of the requested value). Further SQL \"LIKE\" " + + "wildcard characters will be resolved correctly.") @JsonProperty("classification-key-like") private final String[] classificationKeyLike; @@ -550,6 +1468,12 @@ public class TaskQueryFilterParameter implements QueryParameter * search (% is appended to the front and end of the requested value). Further SQL "LIKE" wildcard * characters will be resolved correctly. */ + @Schema( + name = "classification-key-not-like", + description = + "Filter by what the classification key of the Task shouldn't be. This results in a " + + "substring search (% is appended to the front and end of the requested value). " + + "Further SQL \"LIKE\" wildcard characters will be resolved correctly.") @JsonProperty("classification-key-not-like") private final String[] classificationKeyNotLike; // endregion @@ -558,6 +1482,11 @@ public class TaskQueryFilterParameter implements QueryParameter * Filter by the key of the parent Classification of the Classification of the Task. This is an * exact match. */ + @Schema( + name = "classification-parent-key", + description = + "Filter by the key of the parent Classification of the Classification of the Task. This" + + " is an exact match.") @JsonProperty("classification-parent-key") private final String[] classificationParentKeyIn; @@ -565,6 +1494,11 @@ public class TaskQueryFilterParameter implements QueryParameter * Filter by what the key of the parent Classification of the Classification of the Task shouldn't * be. This is an exact match. */ + @Schema( + name = "classification-parent-key-not", + description = + "Filter by what the key of the parent Classification of the Classification of the Task " + + "shouldn't be. This is an exact match.") @JsonProperty("classification-parent-key-not") private final String[] classificationParentKeyNotIn; @@ -573,6 +1507,13 @@ public class TaskQueryFilterParameter implements QueryParameter * in a substring search (% is appended to the front and end of the requested value). Further SQL * "LIKE" wildcard characters will be resolved correctly. */ + @Schema( + name = "classification-parent-key-like", + description = + "Filter by the key of the parent Classification of the Classification of the Task. This" + + " results in a substring search (% is appended to the front and end of the " + + "requested value). Further SQL \"LIKE\" wildcard characters will be resolved " + + "correctly.") @JsonProperty("classification-parent-key-like") private final String[] classificationParentKeyLike; @@ -581,17 +1522,32 @@ public class TaskQueryFilterParameter implements QueryParameter * be. This results in a substring search (% is appended to the front and end of the requested * value). Further SQL "LIKE" wildcard characters will be resolved correctly. */ + @Schema( + name = "classification-parent-key-not-like", + description = + "Filter by what the key of the parent Classification of the Classification of the Task " + + "shouldn't be. This results in a substring search (% is appended to the front and " + + "end of the requested value). Further SQL \"LIKE\" wildcard characters will be " + + "resolved correctly.") @JsonProperty("classification-parent-key-not-like") private final String[] classificationParentKeyNotLike; // endregion // region classificationCategory /** Filter by the classification category of the Task. This is an exact match. */ + @Schema( + name = "classification-category", + description = "Filter by the classification category of the Task. This is an exact match.") @JsonProperty("classification-category") private final String[] classificationCategoryIn; /** * Filter by what the classification category of the Task shouldn't be. This is an exact match. */ + @Schema( + name = "classification-category-not", + description = + "Filter by what the classification category of the Task shouldn't be. This is an exact " + + "match.") @JsonProperty("classification-category-not") private final String[] classificationCategoryNotIn; @@ -600,6 +1556,12 @@ public class TaskQueryFilterParameter implements QueryParameter * appended to the front and end of the requested value). Further SQL "LIKE" wildcard characters * will be resolved correctly. */ + @Schema( + name = "classification-category-like", + description = + "Filter by the classification category of the Task. This results in a substring search " + + "(% is appended to the front and end of the requested value). Further SQL \"LIKE\"" + + " wildcard characters will be resolved correctly.") @JsonProperty("classification-category-like") private final String[] classificationCategoryLike; @@ -608,15 +1570,29 @@ public class TaskQueryFilterParameter implements QueryParameter * substring search (% is appended to the front and end of the requested value). Further SQL * "LIKE" wildcard characters will be resolved correctly. */ + @Schema( + name = "classification-category-not-like", + description = + "Filter by what the classification category of the Task shouldn't be. This results in a " + + "substring search (% is appended to the front and end of the requested value). " + + "Further SQL \"LIKE\" wildcard characters will be resolved correctly.") @JsonProperty("classification-category-not-like") private final String[] classificationCategoryNotLike; // endregion // region classificationName /** Filter by the classification name of the Task. This is an exact match. */ + @Schema( + name = "classification-name", + description = "Filter by the classification name of the Task. This is an exact match.") @JsonProperty("classification-name") private final String[] classificationNameIn; /** Filter by what the classification name of the Task shouldn't be. This is an exact match. */ + @Schema( + name = "classification-name-not", + description = + "Filter by what the classification name of the Task shouldn't be. This is an exact " + + "match.") @JsonProperty("classification-name-not") private final String[] classificationNameNotIn; @@ -625,6 +1601,12 @@ public class TaskQueryFilterParameter implements QueryParameter * appended to the front and end of the requested value). Further SQL "LIKE" wildcard characters * will be resolved correctly. */ + @Schema( + name = "classification-name-like", + description = + "Filter by the classification name of the Task. This results in a substring search (% " + + "is appended to the front and end of the requested value). Further SQL \"LIKE\" " + + "wildcard characters will be resolved correctly.") @JsonProperty("classification-name-like") private final String[] classificationNameLike; @@ -633,15 +1615,28 @@ public class TaskQueryFilterParameter implements QueryParameter * search (% is appended to the front and end of the requested value). Further SQL "LIKE" wildcard * characters will be resolved correctly. */ + @Schema( + name = "classification-name-not-like", + description = + "Filter by what the classification name of the Task shouldn't be. This results in a " + + "substring search (% is appended to the front and end of the requested value). " + + "Further SQL \"LIKE\" wildcard characters will be resolved correctly.") @JsonProperty("classification-name-not-like") private final String[] classificationNameNotLike; // endregion // region workbasketId /** Filter by workbasket id of the Task. This is an exact match. */ + @Schema( + name = "workbasket-id", + description = "Filter by workbasket id of the Task. This is an exact match.") @JsonProperty("workbasket-id") private final String[] workbasketIdIn; /** Filter by what the workbasket id of the Task shouldn't be. This is an exact match. */ + @Schema( + name = "workbasket-id-not", + description = + "Filter by what the workbasket id of the Task shouldn't be. This is an exact match.") @JsonProperty("workbasket-id-not") private final String[] workbasketIdNotIn; // endregion @@ -650,6 +1645,11 @@ public class TaskQueryFilterParameter implements QueryParameter * Filter by workbasket keys of the Task. This parameter can only be used in combination with * 'domain' */ + @Schema( + name = "workbasket-key", + description = + "Filter by workbasket keys of the Task. This parameter can only be used in combination " + + "with 'domain'") @JsonProperty("workbasket-key") private final String[] workbasketKeyIn; @@ -657,19 +1657,33 @@ public class TaskQueryFilterParameter implements QueryParameter * Filter by what the workbasket keys of the Task aren't. This parameter can only be used in * combination with 'domain' */ + @Schema( + name = "workbasket-key-not", + description = + "Filter by what the workbasket keys of the Task aren't. This parameter can only be used " + + "in combination with 'domain'") @JsonProperty("workbasket-key-not") private final String[] workbasketKeyNotIn; /** Filter by domain of the Task. This is an exact match. */ + @Schema(name = "domain", description = "Filter by domain of the Task. This is an exact match.") @JsonProperty("domain") private final String domain; // endregion // region businessProcessId /** Filter by the business process id of the Task. This is an exact match. */ + @Schema( + name = "business-process-id", + description = "Filter by the business process id of the Task. This is an exact match.") @JsonProperty("business-process-id") private final String[] businessProcessIdIn; /** Filter by what the business process id of the Task shouldn't be. This is an exact match. */ + @Schema( + name = "business-process-id-not", + description = + "Filter by what the business process id of the Task shouldn't be. This is an exact " + + "match.") @JsonProperty("business-process-id-not") private final String[] businessProcessIdNot; @@ -678,6 +1692,12 @@ public class TaskQueryFilterParameter implements QueryParameter * appended to the front and end of the requested value). Further SQL "LIKE" wildcard characters * will be resolved correctly. */ + @Schema( + name = "business-process-id-like", + description = + "Filter by the business process id of the Task. This results in a substring search (% is" + + " appended to the front and end of the requested value). Further SQL \"LIKE\" " + + "wildcard characters will be resolved correctly.") @JsonProperty("business-process-id-like") private final String[] businessProcessIdLike; @@ -686,18 +1706,32 @@ public class TaskQueryFilterParameter implements QueryParameter * (% is appended to the front and end of the requested value). Further SQL "LIKE" wildcard * characters will be resolved correctly. */ + @Schema( + name = "business-process-id-not-like", + description = + "Filter by the business process id of the Task shouldn't be. This results in a substring" + + " search (% is appended to the front and end of the requested value). Further SQL " + + "\"LIKE\" wildcard characters will be resolved correctly.") @JsonProperty("business-process-id-not-like") private final String[] businessProcessIdNotLike; // endregion // region parentBusinessProcessId /** Filter by the parent business process id of the Task. This is an exact match. */ + @Schema( + name = "parent-business-process-id", + description = "Filter by the parent business process id of the Task. This is an exact match.") @JsonProperty("parent-business-process-id") private final String[] parentBusinessProcessIdIn; /** * Filter by what the parent business process id of the Task shouldn't be. This is an exact match. */ + @Schema( + name = "parent-business-process-id-not", + description = + "Filter by what the parent business process id of the Task shouldn't be. This is an " + + "exact match.") @JsonProperty("parent-business-process-id-not") private final String[] parentBusinessProcessIdNotIn; @@ -706,6 +1740,12 @@ public class TaskQueryFilterParameter implements QueryParameter * appended to the front and end of the requested value). Further SQL "LIKE" wildcard characters * will be resolved correctly. */ + @Schema( + name = "parent-business-process-id-like", + description = + "Filter by the parent business process id of the Task. This results in a substring " + + "search (% is appended to the front and end of the requested value). Further SQL " + + "\"LIKE\" wildcard characters will be resolved correctly.") @JsonProperty("parent-business-process-id-like") private final String[] parentBusinessProcessIdLike; @@ -714,6 +1754,12 @@ public class TaskQueryFilterParameter implements QueryParameter * search (% is appended to the front and end of the requested value). Further SQL "LIKE" wildcard * characters will be resolved correctly. */ + @Schema( + name = "parent-business-process-id-not-like", + description = + "Filter by the parent business process id of the Task shouldn't be. This results in a " + + "substring search (% is appended to the front and end of the requested value). " + + "Further SQL \"LIKE\" wildcard characters will be resolved correctly.") @JsonProperty("parent-business-process-id-not-like") private final String[] parentBusinessProcessIdNotLike; @@ -724,6 +1770,9 @@ public class TaskQueryFilterParameter implements QueryParameter private final String[] ownerIn; /** Filter by what the owner of the Task shouldn't be. This is an exact match. */ + @Schema( + name = "owner-not", + description = "Filter by what the owner of the Task shouldn't be. This is an exact match.") @JsonProperty("owner-not") private final String[] ownerNotIn; @@ -732,6 +1781,12 @@ public class TaskQueryFilterParameter implements QueryParameter * and end of the requested value). Further SQL "LIKE" wildcard characters will be resolved * correctly. */ + @Schema( + name = "owner-like", + description = + "Filter by the owner of the Task. This results in a substring search (% is appended to " + + "the front and end of the requested value). Further SQL \"LIKE\" wildcard " + + "characters will be resolved correctly.") @JsonProperty("owner-like") private final String[] ownerLike; @@ -740,6 +1795,12 @@ public class TaskQueryFilterParameter implements QueryParameter * appended to the front and end of the requested value). Further SQL "LIKE" wildcard characters * will be resolved correctly. */ + @Schema( + name = "owner-not-like", + description = + "Filter by what the owner of the Task shouldn't be. This results in a substring search " + + "(% is appended to the front and end of the requested value). Further SQL \"LIKE\"" + + " wildcard characters will be resolved correctly.") @JsonProperty("owner-not-like") private final String[] ownerNotLike; @@ -747,6 +1808,11 @@ public class TaskQueryFilterParameter implements QueryParameter * Filter by tasks that have no owner. The parameter should exactly be "owner-is-null" without * being followed by "=..." */ + @Schema( + name = "owner-is-null", + description = + "Filter by tasks that have no owner. The parameter should exactly be \"owner-is-null\" " + + "without being followed by \"=...\"") @JsonProperty("owner-is-null") private final String ownerNull; // endregion @@ -757,11 +1823,23 @@ public class TaskQueryFilterParameter implements QueryParameter * specified according to the description of complex parameters in the overview, e.g. * por={"value":"exampleValue"} */ + @Schema( + name = "por", + description = + "Filter by the primary object reference of the Task. This is an exact match. \"por\" is" + + " a parameter of complex type. Its following attributes from por[].id to " + + "por[].value can be specified according to the description of complex parameters " + + "in the overview, e.g. por={\"value\":\"exampleValue\"}") @JsonProperty("por") private final ObjectReference[] primaryObjectReferenceIn; // endregion // region primaryObjectReferenceCompany /** Filter by the company of the primary object reference of the Task. This is an exact match. */ + @Schema( + name = "por-company", + description = + "Filter by the company of the primary object reference of the Task. This is an exact " + + "match.") @JsonProperty("por-company") private final String[] porCompanyIn; @@ -769,6 +1847,11 @@ public class TaskQueryFilterParameter implements QueryParameter * Filter by what the company of the primary object reference of the Task shouldn't be. This is an * exact match. */ + @Schema( + name = "por-company-not", + description = + "Filter by what the company of the primary object reference of the Task shouldn't be. " + + "This is an exact match.") @JsonProperty("por-company-not") private final String[] porCompanyNotIn; @@ -777,6 +1860,12 @@ public class TaskQueryFilterParameter implements QueryParameter * search (% is appended to the front and end of the requested value). Further SQL "LIKE" wildcard * characters will be resolved correctly. */ + @Schema( + name = "por-company-like", + description = + "Filter by the company of the primary object reference of the Task. This results in a " + + "substring search (% is appended to the front and end of the requested value). " + + "Further SQL \"LIKE\" wildcard characters will be resolved correctly.") @JsonProperty("por-company-like") private final String[] porCompanyLike; @@ -785,11 +1874,23 @@ public class TaskQueryFilterParameter implements QueryParameter * results in a substring search (% is appended to the front and end of the requested value). * Further SQL "LIKE" wildcard characters will be resolved correctly. */ + @Schema( + name = "por-company-not-like", + description = + "Filter by what the company of the primary object reference of the Task shouldn't be. " + + "This results in a substring search (% is appended to the front and end of the " + + "requested value). Further SQL \"LIKE\" wildcard characters will be resolved " + + "correctly.") @JsonProperty("por-company-not-like") private final String[] porCompanyNotLike; // endregion // region primaryObjectReferenceSystem /** Filter by the system of the primary object reference of the Task. This is an exact match. */ + @Schema( + name = "por-system", + description = + "Filter by the system of the primary object reference of the Task. This is an exact " + + "match.") @JsonProperty("por-system") private final String[] porSystemIn; @@ -797,6 +1898,11 @@ public class TaskQueryFilterParameter implements QueryParameter * Filter by what the system of the primary object reference of the Task shouldn't be. This is an * exact match. */ + @Schema( + name = "por-system-not", + description = + "Filter by what the system of the primary object reference of the Task shouldn't be. " + + "This is an exact match.") @JsonProperty("por-system-not") private final String[] porSystemNotIn; @@ -805,6 +1911,12 @@ public class TaskQueryFilterParameter implements QueryParameter * search (% is appended to the front and end of the requested value). Further SQL "LIKE" wildcard * characters will be resolved correctly. */ + @Schema( + name = "por-system-like", + description = + "Filter by the system of the primary object reference of the Task. This results in a " + + "substring search (% is appended to the front and end of the requested value). " + + "Further SQL \"LIKE\" wildcard characters will be resolved correctly.") @JsonProperty("por-system-like") private final String[] porSystemLike; @@ -813,6 +1925,13 @@ public class TaskQueryFilterParameter implements QueryParameter * results in a substring search (% is appended to the front and end of the requested value). * Further SQL "LIKE" wildcard characters will be resolved correctly. */ + @Schema( + name = "por-system-not-like", + description = + "Filter by what the system of the primary object reference of the Task shouldn't be. " + + "This results in a substring search (% is appended to the front and end of the " + + "requested value). Further SQL \"LIKE\" wildcard characters will be resolved " + + "correctly.") @JsonProperty("por-system-not-like") private final String[] porSystemNotLike; // endregion @@ -821,6 +1940,11 @@ public class TaskQueryFilterParameter implements QueryParameter * Filter by the system instance of the primary object reference of the Task. This is an exact * match. */ + @Schema( + name = "por-instance", + description = + "Filter by the system instance of the primary object reference of the Task. This is an " + + "exact match.") @JsonProperty("por-instance") private final String[] porInstanceIn; @@ -828,6 +1952,11 @@ public class TaskQueryFilterParameter implements QueryParameter * Filter by what the system instance of the primary object reference of the Task shouldn't be. * This is an exact match. */ + @Schema( + name = "por-instance-not", + description = + "Filter by what the system instance of the primary object reference of the Task " + + "shouldn't be. This is an exact match.") @JsonProperty("por-instance-not") private final String[] porInstanceNotIn; @@ -836,6 +1965,12 @@ public class TaskQueryFilterParameter implements QueryParameter * substring search (% is appended to the front and end of the requested value). Further SQL * "LIKE" wildcard characters will be resolved correctly. */ + @Schema( + name = "por-instance-like", + description = + "Filter by the system instance of the primary object reference of the Task. This results" + + " in a substring search (% is appended to the front and end of the requested " + + "value). Further SQL \"LIKE\" wildcard characters will be resolved correctly.") @JsonProperty("por-instance-like") private final String[] porInstanceLike; @@ -844,11 +1979,22 @@ public class TaskQueryFilterParameter implements QueryParameter * This results in a substring search (% is appended to the front and end of the requested value). * Further SQL "LIKE" wildcard characters will be resolved correctly. */ + @Schema( + name = "por-instance-not-like", + description = + "Filter by what the system instance of the primary object reference of the Task " + + "shouldn't be. This results in a substring search (% is appended to the front and" + + " end of the requested value). Further SQL \"LIKE\" wildcard characters will be " + + "resolved correctly.") @JsonProperty("por-instance-not-like") private final String[] porInstanceNotLike; // endregion // region primaryObjectReferenceSystemType /** Filter by the type of the primary object reference of the Task. This is an exact match. */ + @Schema( + name = "por-type", + description = + "Filter by the type of the primary object reference of the Task. This is an exact match.") @JsonProperty("por-type") private final String[] porTypeIn; @@ -856,6 +2002,11 @@ public class TaskQueryFilterParameter implements QueryParameter * Filter by what the type of the primary object reference of the Task shouldn't be. This is an * exact match. */ + @Schema( + name = "por-type-not", + description = + "Filter by what the type of the primary object reference of the Task shouldn't be. This " + + "is an exact match.") @JsonProperty("por-type-not") private final String[] porTypeNotIn; @@ -864,6 +2015,12 @@ public class TaskQueryFilterParameter implements QueryParameter * search (% is appended to the front and end of the requested value). Further SQL "LIKE" wildcard * characters will be resolved correctly. */ + @Schema( + name = "por-type-like", + description = + "Filter by the type of the primary object reference of the Task. This results in a " + + "substring search (% is appended to the front and end of the requested value)." + + " Further SQL \"LIKE\" wildcard characters will be resolved correctly.") @JsonProperty("por-type-like") private final String[] porTypeLike; @@ -872,11 +2029,23 @@ public class TaskQueryFilterParameter implements QueryParameter * in a substring search (% is appended to the front and end of the requested value). Further SQL * "LIKE" wildcard characters will be resolved correctly. */ + @Schema( + name = "por-type-not-like", + description = + "Filter by what the type of the primary object reference of the Task shouldn't be. This " + + "results in a substring search (% is appended to the front and end of the " + + "requested value). Further SQL \"LIKE\" wildcard characters will be resolved " + + "correctly.") @JsonProperty("por-type-not-like") private final String[] porTypeNotLike; // endregion // region primaryObjectReferenceSystemValue /** Filter by the value of the primary object reference of the Task. This is an exact match. */ + @Schema( + name = "por-value", + description = + "Filter by the value of the primary object reference of the Task. This is an exact " + + "match.") @JsonProperty("por-value") private final String[] porValueIn; @@ -884,6 +2053,11 @@ public class TaskQueryFilterParameter implements QueryParameter * Filter by what the value of the primary object reference of the Task shouldn't be. This is an * exact match. */ + @Schema( + name = "por-value-not", + description = + "Filter by what the value of the primary object reference of the Task shouldn't be. This" + + " is an exact match.") @JsonProperty("por-value-not") private final String[] porValueNotIn; @@ -892,6 +2066,12 @@ public class TaskQueryFilterParameter implements QueryParameter * search (% is appended to the front and end of the requested value). Further SQL "LIKE" wildcard * characters will be resolved correctly. */ + @Schema( + name = "por-value-like", + description = + "Filter by the value of the primary object reference of the Task. This results in a " + + "substring search (% is appended to the front and end of the requested value). " + + "Further SQL \"LIKE\" wildcard characters will be resolved correctly.") @JsonProperty("por-value-like") private final String[] porValueLike; @@ -900,6 +2080,13 @@ public class TaskQueryFilterParameter implements QueryParameter * in a substring search (% is appended to the front and end of the requested value). Further SQL * "LIKE" wildcard characters will be resolved correctly. */ + @Schema( + name = "por-value-not-like", + description = + "Filter by what the value of the primary object reference of the Task shouldn't be. This" + + " results in a substring search (% is appended to the front and end of the " + + "requested value). Further SQL \"LIKE\" wildcard characters will be resolved " + + "correctly.") @JsonProperty("por-value-not-like") private final String[] porValueNotLike; // endregion @@ -910,6 +2097,13 @@ public class TaskQueryFilterParameter implements QueryParameter * specified according to the description of complex parameters in the overview, e.g. * sor={"value":"exampleValue"} */ + @Schema( + name = "sor", + description = + "Filter by the primary object reference of the Task. This is an exact match. \"sor\" is" + + " a parameter of complex type. Its following attributes from sor[].id to " + + "sor[].value can be specified according to the description of complex parameters" + + " in the overview, e.g. sor={\"value\":\"exampleValue\"}") @JsonProperty("sor") private final ObjectReference[] secondaryObjectReferenceIn; // endregion @@ -917,6 +2111,11 @@ public class TaskQueryFilterParameter implements QueryParameter /** * Filter by the company of the secondary object reference of the Task. This is an exact match. */ + @Schema( + name = "sor-company", + description = + "Filter by the company of the secondary object reference of the Task. This is an exact " + + "match.") @JsonProperty("sor-company") private final String[] sorCompanyIn; @@ -925,12 +2124,23 @@ public class TaskQueryFilterParameter implements QueryParameter * substring search (% is appended to the front and end of the requested value). Further SQL * "LIKE" wildcard characters will be resolved correctly. */ + @Schema( + name = "sor-company-like", + description = + "Filter by the company of the secondary object references of the Task. This results in a" + + " substring search (% is appended to the front and end of the requested value). " + + "Further SQL \"LIKE\" wildcard characters will be resolved correctly.") @JsonProperty("sor-company-like") private final String[] sorCompanyLike; // endregion // region secondaryObjectReferenceSystem /** Filter by the system of the secondary object reference of the Task. This is an exact match. */ + @Schema( + name = "sor-system", + description = + "Filter by the system of the secondary object reference of the Task. This is an exact " + + "match.") @JsonProperty("sor-system") private final String[] sorSystemIn; @@ -939,6 +2149,12 @@ public class TaskQueryFilterParameter implements QueryParameter * search (% is appended to the front and end of the requested value). Further SQL "LIKE" wildcard * characters will be resolved correctly. */ + @Schema( + name = "sor-system-like", + description = + "Filter by the system of the secondary object reference of the Task. This results in a " + + "substring search (% is appended to the front and end of the requested value). " + + "Further SQL \"LIKE\" wildcard characters will be resolved correctly.") @JsonProperty("sor-system-like") private final String[] sorSystemLike; @@ -948,6 +2164,11 @@ public class TaskQueryFilterParameter implements QueryParameter * Filter by the system instance of the secondary object reference of the Task. This is an exact * match. */ + @Schema( + name = "sor-instance", + description = + "Filter by the system instance of the secondary object reference of the Task. This is " + + "an exact match.") @JsonProperty("sor-instance") private final String[] sorInstanceIn; @@ -956,12 +2177,24 @@ public class TaskQueryFilterParameter implements QueryParameter * substring search (% is appended to the front and end of the requested value). Further SQL * "LIKE" wildcard characters will be resolved correctly. */ + @Schema( + name = "sor-instance-like", + description = + "Filter by the system instance of the secondary object reference of the Task. This " + + "results in a substring search (% is appended to the front and end of the " + + "requested value). Further SQL \"LIKE\" wildcard characters will be resolved " + + "correctly.") @JsonProperty("sor-instance-like") private final String[] sorInstanceLike; // endregion // region secondaryObjectReferenceSystemType /** Filter by the type of the secondary object reference of the Task. This is an exact match. */ + @Schema( + name = "sor-type", + description = + "Filter by the type of the secondary object reference of the Task. This is an exact " + + "match.") @JsonProperty("sor-type") private final String[] sorTypeIn; @@ -970,12 +2203,23 @@ public class TaskQueryFilterParameter implements QueryParameter * search (% is appended to the front and end of the requested value). Further SQL "LIKE" wildcard * characters will be resolved correctly. */ + @Schema( + name = "sor-type-like", + description = + "Filter by the type of the secondary object reference of the Task. This results in a " + + "substring search (% is appended to the front and end of the requested value). " + + "Further SQL \"LIKE\" wildcard characters will be resolved correctly.") @JsonProperty("sor-type-like") private final String[] sorTypeLike; // endregion // region primaryObjectReferenceSystemValue /** Filter by the value of the secondary object reference of the Task. This is an exact match. */ + @Schema( + name = "sor-value", + description = + "Filter by the value of the secondary object reference of the Task. This is an exact " + + "match.") @JsonProperty("sor-value") private final String[] sorValueIn; @@ -984,22 +2228,38 @@ public class TaskQueryFilterParameter implements QueryParameter * search (% is appended to the front and end of the requested value). Further SQL "LIKE" wildcard * characters will be resolved correctly. */ + @Schema( + name = "sor-value-like", + description = + "Filter by the value of the secondary object reference of the Task. This results in a " + + "substring search (% is appended to the front and end of the requested value). " + + "Further SQL \"LIKE\" wildcard characters will be resolved correctly.") @JsonProperty("sor-value-like") private final String[] sorValueLike; // endregion // region read /** Filter by the is read flag of the Task. This is an exact match. */ + @Schema( + name = "is-read", + description = "Filter by the is read flag of the Task. This is an exact match.") @JsonProperty("is-read") private final Boolean isRead; // endregion // region transferred /** Filter by the is transferred flag of the Task. This is an exact match. */ + @Schema( + name = "is-transferred", + description = "Filter by the is transferred flag of the Task. This is an exact match.") @JsonProperty("is-transferred") private final Boolean isTransferred; // endregion // region attachmentClassificationId /** Filter by the attachment classification id of the Task. This is an exact match. */ + @Schema( + name = "attachment-classification-id", + description = + "Filter by the attachment classification id of the Task. This is an exact match.") @JsonProperty("attachment-classification-id") private final String[] attachmentClassificationIdIn; @@ -1007,11 +2267,20 @@ public class TaskQueryFilterParameter implements QueryParameter * Filter by what the attachment classification id of the Task shouldn't be. This is an exact * match. */ + @Schema( + name = "attachment-classification-id-not", + description = + "Filter by what the attachment classification id of the Task shouldn't be. This is an " + + "exact match.") @JsonProperty("attachment-classification-id-not") private final String[] attachmentClassificationIdNotIn; // endregion // region attachmentClassificationKey /** Filter by the attachment classification key of the Task. This is an exact match. */ + @Schema( + name = "attachment-classification-key", + description = + "Filter by the attachment classification key of the Task. This is an exact match.") @JsonProperty("attachment-classification-key") private final String[] attachmentClassificationKeyIn; @@ -1019,6 +2288,11 @@ public class TaskQueryFilterParameter implements QueryParameter * Filter by what the attachment classification key of the Task shouldn't be. This is an exact * match. */ + @Schema( + name = "attachment-classification-key-not", + description = + "Filter by what the attachment classification key of the Task shouldn't be. This is an " + + "exact match.") @JsonProperty("attachment-classification-key-not") private final String[] attachmentClassificationKeyNotIn; @@ -1027,6 +2301,12 @@ public class TaskQueryFilterParameter implements QueryParameter * is appended to the front and end of the requested value). Further SQL "LIKE" wildcard * characters will be resolved correctly. */ + @Schema( + name = "attachment-classification-key-like", + description = + "Filter by the attachment classification key of the Task. This results in a substring " + + "search (% is appended to the front and end of the requested value). Further SQL " + + "\"LIKE\" wildcard characters will be resolved correctly.") @JsonProperty("attachment-classification-key-like") private final String[] attachmentClassificationKeyLike; @@ -1035,11 +2315,21 @@ public class TaskQueryFilterParameter implements QueryParameter * substring search (% is appended to the front and end of the requested value). Further SQL * "LIKE" wildcard characters will be resolved correctly. */ + @Schema( + name = "attachment-classification-key-not-like", + description = + "Filter by what the attachment classification key of the Task shouldn't be. This results" + + " in a substring search (% is appended to the front and end of the requested " + + "value). Further SQL \"LIKE\" wildcard characters will be resolved correctly.") @JsonProperty("attachment-classification-key-not-like") private final String[] attachmentClassificationKeyNotLike; // endregion // region attachmentClassificationName /** Filter by the attachment classification name of the Task. This is an exact match. */ + @Schema( + name = "attachment-classification-name", + description = + "Filter by the attachment classification name of the Task. This is an exact match.") @JsonProperty("attachment-classification-name") private final String[] attachmentClassificationNameIn; @@ -1047,6 +2337,11 @@ public class TaskQueryFilterParameter implements QueryParameter * Filter by what the attachment classification name of the Task shouldn't be. This is an exact * match. */ + @Schema( + name = "attachment-classification-name-not", + description = + "Filter by what the attachment classification name of the Task shouldn't be. This is an " + + "exact match.") @JsonProperty("attachment-classification-name-not") private final String[] attachmentClassificationNameNotIn; @@ -1055,6 +2350,12 @@ public class TaskQueryFilterParameter implements QueryParameter * is appended to the front and end of the requested value). Further SQL "LIKE" wildcard * characters will be resolved correctly. */ + @Schema( + name = "attachment-classification-name-like", + description = + "Filter by the attachment classification name of the Task. This results in a substring " + + "search (% is appended to the front and end of the requested value). Further SQL " + + "\"LIKE\" wildcard characters will be resolved correctly.") @JsonProperty("attachment-classification-name-like") private final String[] attachmentClassificationNameLike; @@ -1063,15 +2364,30 @@ public class TaskQueryFilterParameter implements QueryParameter * substring search (% is appended to the front and end of the requested value). Further SQL * "LIKE" wildcard characters will be resolved correctly. */ + @Schema( + name = "attachment-classification-name-not-like", + description = + "Filter by what the attachment classification name of the Task shouldn't be. This " + + "results in a substring search (% is appended to the front and end of the " + + "requested value). Further SQL \"LIKE\" wildcard characters will be resolved " + + "correctly.") @JsonProperty("attachment-classification-name-not-like") private final String[] attachmentClassificationNameNotLike; // endregion // region attachmentChannel /** Filter by the attachment channel of the Task. This is an exact match. */ + @Schema( + name = "attachment-channel", + description = "Filter by the attachment channel of the Task. This is an exact match.") @JsonProperty("attachment-channel") private final String[] attachmentChannelIn; /** Filter by what the attachment channel of the Task shouldn't be. This is an exact match. */ + @Schema( + name = "attachment-channel-not", + description = + "Filter by what the attachment channel of the Task shouldn't be. This is an exact " + + "match.") @JsonProperty("attachment-channel-not") private final String[] attachmentChannelNotIn; @@ -1080,6 +2396,12 @@ public class TaskQueryFilterParameter implements QueryParameter * to the front and end of the requested value). Further SQL "LIKE" wildcard characters will be * resolved correctly. */ + @Schema( + name = "attachment-channel-like", + description = + "Filter by the attachment channel of the Task. This results in a substring search (% is " + + "appended to the front and end of the requested value). Further SQL \"LIKE\" " + + "wildcard characters will be resolved correctly.") @JsonProperty("attachment-channel-like") private final String[] attachmentChannelLike; @@ -1088,15 +2410,29 @@ public class TaskQueryFilterParameter implements QueryParameter * search (% is appended to the front and end of the requested value). Further SQL "LIKE" wildcard * characters will be resolved correctly. */ + @Schema( + name = "attachment-channel-not-like", + description = + "Filter by what the attachment channel of the Task shouldn't be. This results in a " + + "substring search (% is appended to the front and end of the requested value). " + + "Further SQL \"LIKE\" wildcard characters will be resolved correctly.") @JsonProperty("attachment-channel-not-like") private final String[] attachmentChannelNotLike; // endregion // region attachmentReferenceValue /** Filter by the attachment reference of the Task. This is an exact match. */ + @Schema( + name = "attachment-reference", + description = "Filter by the attachment reference of the Task. This is an exact match.") @JsonProperty("attachment-reference") private final String[] attachmentReferenceIn; /** Filter by what the attachment reference of the Task shouldn't be. This is an exact match. */ + @Schema( + name = "attachment-reference-not", + description = + "Filter by what the attachment reference of the Task shouldn't be. This is an exact " + + "match.") @JsonProperty("attachment-reference-not") private final String[] attachmentReferenceNotIn; @@ -1105,6 +2441,12 @@ public class TaskQueryFilterParameter implements QueryParameter * appended to the front and end of the requested value). Further SQL "LIKE" wildcard characters * will be resolved correctly. */ + @Schema( + name = "attachment-reference-like", + description = + "Filter by the attachment reference of the Task. This results in a substring search (% " + + "is appended to the front and end of the requested value). Further SQL \"LIKE\" " + + "wildcard characters will be resolved correctly.") @JsonProperty("attachment-reference-like") private final String[] attachmentReferenceLike; @@ -1113,6 +2455,12 @@ public class TaskQueryFilterParameter implements QueryParameter * search (% is appended to the front and end of the requested value). Further SQL "LIKE" wildcard * characters will be resolved correctly. */ + @Schema( + name = "attachment-reference-not-like", + description = + "Filter by what the attachment reference of the Task shouldn't be. This results in a " + + "substring search (% is appended to the front and end of the requested value). " + + "Further SQL \"LIKE\" wildcard characters will be resolved correctly.") @JsonProperty("attachment-reference-not-like") private final String[] attachmentReferenceNotLike; // endregion @@ -1123,6 +2471,11 @@ public class TaskQueryFilterParameter implements QueryParameter * *

The format is ISO-8601. */ + @Schema( + name = "attachment-received", + description = + "Filter by a time interval within which the attachment of the Task was received. To " + + "create an open interval you can just leave it blank.

The format is ISO-8601.") @JsonProperty("attachment-received") private final Instant[] attachmentReceivedWithin; @@ -1132,6 +2485,11 @@ public class TaskQueryFilterParameter implements QueryParameter * *

The format is ISO-8601. */ + @Schema( + name = "attachment-received-not", + description = + "Filter by a time interval within which the attachment of the Task wasn't received. To " + + "create an open interval you can just leave it blank.

The format is ISO-8601.") @JsonProperty("attachment-received-not") private final Instant[] attachmentReceivedNotWithin; // endregion @@ -1140,15 +2498,27 @@ public class TaskQueryFilterParameter implements QueryParameter * In order to filter Tasks that don't have any Attachments, set 'without-attachment' to 'true'. * Any other value for 'without-attachment' is invalid. */ + @Schema( + name = "without-attachment", + description = + "In order to filter Tasks that don't have any Attachments, set 'without-attachment' to " + + "'true'. Any other value for 'without-attachment' is invalid.") @JsonProperty("without-attachment") private final Boolean withoutAttachment; // endregion // region callbackState /** Filter by the callback state of the Task. This is an exact match. */ + @Schema( + name = "callback-state", + description = "Filter by the callback state of the Task. This is an exact match.") @JsonProperty("callback-state") private final CallbackState[] callbackStateIn; /** Filter by what the callback state of the Task shouldn't be. This is an exact match. */ + @Schema( + name = "callback-state-not", + description = + "Filter by what the callback state of the Task shouldn't be. This is an exact match.") @JsonProperty("callback-state-not") private final CallbackState[] callbackStateNotIn; // endregion @@ -1158,6 +2528,11 @@ public class TaskQueryFilterParameter implements QueryParameter * *

This must be used in combination with 'wildcard-search-value' */ + @Schema( + name = "wildcard-search-fields", + description = + "Filter by wildcard search field of the Task.

This must be used in combination with " + + "'wildcard-search-value'") @JsonProperty("wildcard-search-fields") private final WildcardSearchField[] wildcardSearchFieldIn; @@ -1166,6 +2541,11 @@ public class TaskQueryFilterParameter implements QueryParameter * *

This must be used in combination with 'wildcard-search-fields' */ + @Schema( + name = "wildcard-search-value", + description = + "Filter by wildcard search field of the Task. This is an exact match.

This must be" + + " used in combination with 'wildcard-search-fields'") @JsonProperty("wildcard-search-value") private final String wildcardSearchValue; // endregion @@ -2203,7 +3583,7 @@ private String[] addNullToOwnerIn() { return this.ownerIn; } if (this.ownerIn == null) { - return new String[]{null}; + return new String[] {null}; } List ownerInAsList = new ArrayList<>(Arrays.asList(this.ownerIn)); ownerInAsList.add(null); diff --git a/rest/taskana-rest-spring/src/main/java/pro/taskana/task/rest/TaskQueryGroupByParameter.java b/rest/taskana-rest-spring/src/main/java/pro/taskana/task/rest/TaskQueryGroupByParameter.java index 40c21f0217..4ca08f3fa7 100644 --- a/rest/taskana-rest-spring/src/main/java/pro/taskana/task/rest/TaskQueryGroupByParameter.java +++ b/rest/taskana-rest-spring/src/main/java/pro/taskana/task/rest/TaskQueryGroupByParameter.java @@ -1,6 +1,7 @@ package pro.taskana.task.rest; import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.beans.ConstructorProperties; import java.util.Optional; import java.util.function.Consumer; @@ -22,11 +23,25 @@ public void applyGroupByForQuery(TaskQuery query) { } } + public String getGroupBySor() { + return groupBySor; + } + + public TaskQueryGroupBy getGroupByPor() { + return groupByPor; + } + // region groupBy @JsonProperty("group-by") + @Schema( + name = "group-by" + ) private final TaskQueryGroupBy groupByPor; @JsonProperty("group-by-sor") + @Schema( + name = "group-by-sor" + ) private final String groupBySor; // endregion diff --git a/rest/taskana-rest-spring/src/main/java/pro/taskana/workbasket/rest/WorkbasketController.java b/rest/taskana-rest-spring/src/main/java/pro/taskana/workbasket/rest/WorkbasketController.java index dd4a9d09ef..364046fb3f 100644 --- a/rest/taskana-rest-spring/src/main/java/pro/taskana/workbasket/rest/WorkbasketController.java +++ b/rest/taskana-rest-spring/src/main/java/pro/taskana/workbasket/rest/WorkbasketController.java @@ -1,11 +1,20 @@ package pro.taskana.workbasket.rest; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.ArraySchema; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.ExampleObject; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; import jakarta.servlet.http.HttpServletRequest; import java.beans.ConstructorProperties; import java.util.List; import java.util.function.BiConsumer; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springdoc.core.annotations.ParameterObject; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.hateoas.MediaTypes; import org.springframework.hateoas.config.EnableHypermediaSupport; @@ -89,13 +98,30 @@ public class WorkbasketController { * @param pagingParameter the paging parameters * @return the Workbaskets with the given filter, sort and paging options. */ + @Operation( + summary = "Get a list of all Workbaskets", + description = + "This endpoint retrieves a list of existing Workbaskets. Filters can be applied.", + parameters = {@Parameter(name = "type", example = "PERSONAL")}) + @ApiResponses( + value = { + @ApiResponse( + responseCode = "200", + description = "Found all Workbaskets", + content = { + @Content( + mediaType = MediaTypes.HAL_JSON_VALUE, + schema = + @Schema(implementation = WorkbasketSummaryPagedRepresentationModel.class)) + }), + }) @GetMapping(path = RestEndpoints.URL_WORKBASKET) @Transactional(readOnly = true, rollbackFor = Exception.class) public ResponseEntity getWorkbaskets( HttpServletRequest request, - WorkbasketQueryFilterParameter filterParameter, - WorkbasketQuerySortParameter sortParameter, - QueryPagingParameter pagingParameter) { + @ParameterObject WorkbasketQueryFilterParameter filterParameter, + @ParameterObject WorkbasketQuerySortParameter sortParameter, + @ParameterObject QueryPagingParameter pagingParameter) { QueryParamsValidator.validateParams( request, @@ -125,6 +151,26 @@ public ResponseEntity getWorkbaskets( * @throws NotAuthorizedOnWorkbasketException if the current user has no permissions to access the * requested Workbasket */ + @Operation( + summary = "Get a single Workbasket", + description = "This endpoint retrieves a single Workbasket.", + parameters = { + @Parameter( + name = "workbasketId", + description = "the Id of the requested Workbasket", + required = true, + example = "WBI:100000000000000000000000000000000001") + }, + responses = { + @ApiResponse( + responseCode = "200", + description = "the requested Workbasket", + content = { + @Content( + mediaType = MediaTypes.HAL_JSON_VALUE, + schema = @Schema(implementation = WorkbasketRepresentationModel.class)) + }) + }) @GetMapping(path = RestEndpoints.URL_WORKBASKET_ID, produces = MediaTypes.HAL_JSON_VALUE) @Transactional(readOnly = true, rollbackFor = Exception.class) public ResponseEntity getWorkbasket( @@ -157,6 +203,35 @@ public ResponseEntity getWorkbasket( * @throws WorkbasketInUseException if the Workbasket contains tasks. * @throws NotAuthorizedException if the current user has not correct permissions */ + @Operation( + summary = "Delete a Workbasket", + description = "This endpoint deletes an existing Workbasket", + parameters = { + @Parameter( + name = "workbasketId", + description = "the Id of the requested Workbasket", + required = true, + example = "WBI:100000000000000000000000000000000002") + }, + responses = { + @ApiResponse( + responseCode = "204", + description = "204 NO_CONTENT - Workbasket has been deleted successfully", + content = @Content(schema = @Schema())), + @ApiResponse( + responseCode = "202", + description = + "202 ACCEPTED - Workbasket still contains completed Tasks. It has been " + + "marked for deletion and will be deleted automatically as soon as all " + + "completed Tasks are deleted.", + content = @Content(schema = @Schema())), + @ApiResponse( + responseCode = "423", + description = + "423 LOCKED - Workbasket contains non-completed Tasks and cannot be " + + "deleted.", + content = @Content(schema = @Schema())) + }) @DeleteMapping(path = RestEndpoints.URL_WORKBASKET_ID) @Transactional(rollbackFor = Exception.class, noRollbackFor = WorkbasketNotFoundException.class) public ResponseEntity deleteWorkbasket( @@ -195,6 +270,35 @@ public ResponseEntity deleteWorkbasket( * @throws WorkbasketAlreadyExistException if the Workbasket exists already * @throws DomainNotFoundException if the domain does not exist in the configuration. */ + @Operation( + summary = "Create a new Workbasket", + description = "This endpoint creates a persistent Workbasket.", + requestBody = + @io.swagger.v3.oas.annotations.parameters.RequestBody( + description = "the Workbasket which should be created.", + content = + @Content( + schema = @Schema(implementation = WorkbasketRepresentationModel.class), + examples = + @ExampleObject( + value = + "{\n" + + " \"key\" : \"asdasdasd\",\n" + + " \"name\" : \"this is a wonderful workbasket name\",\n" + + " \"domain\" : \"DOMAIN_A\",\n" + + " \"type\" : \"GROUP\",\n" + + " \"markedForDeletion\" : false\n" + + "}"))), + responses = { + @ApiResponse( + responseCode = "201", + description = "the created Workbasket", + content = { + @Content( + mediaType = MediaTypes.HAL_JSON_VALUE, + schema = @Schema(implementation = WorkbasketRepresentationModel.class)) + }) + }) @PostMapping(path = RestEndpoints.URL_WORKBASKET) @Transactional(rollbackFor = Exception.class) public ResponseEntity createWorkbasket( @@ -226,6 +330,60 @@ public ResponseEntity createWorkbasket( * updated it already * @throws NotAuthorizedOnWorkbasketException if the current user has not correct permissions */ + @Operation( + summary = "Update a Workbasket", + description = "This endpoint creates a persistent Workbasket.", + parameters = { + @Parameter( + name = "workbasketId", + description = "the Id of the requested Workbasket", + required = true, + example = "WBI:100000000000000000000000000000000001") + }, + requestBody = + @io.swagger.v3.oas.annotations.parameters.RequestBody( + description = "the new Workbasket for the requested id", + content = + @Content( + schema = @Schema(implementation = WorkbasketRepresentationModel.class), + examples = + @ExampleObject( + value = + "{\n" + + " \"workbasketId\" : " + + "\"WBI:100000000000000000000000000000000001\",\n" + + " \"key\" : \"GPK_KSC\",\n" + + " \"name\" : \"new name\",\n" + + " \"domain\" : \"DOMAIN_A\",\n" + + " \"type\" : \"GROUP\",\n" + + " \"description\" : \"Gruppenpostkorb KSC\",\n" + + " \"owner\" : \"teamlead-1\",\n" + + " \"custom1\" : \"ABCQVW\",\n" + + " \"custom2\" : \"\",\n" + + " \"custom3\" : \"xyz4\",\n" + + " \"custom4\" : \"\",\n" + + " \"custom5\" : \"\",\n" + + " \"custom6\" : \"\",\n" + + " \"custom7\" : \"\",\n" + + " \"custom8\" : \"\",\n" + + " \"orgLevel1\" : \"\",\n" + + " \"orgLevel2\" : \"\",\n" + + " \"orgLevel3\" : \"\",\n" + + " \"orgLevel4\" : \"\",\n" + + " \"markedForDeletion\" : false,\n" + + " \"created\" : \"2018-02-01T12:00:00.000Z\",\n" + + " \"modified\" : \"2018-02-01T12:00:00.000Z\"\n" + + "}"))), + responses = { + @ApiResponse( + responseCode = "200", + description = "the requested Workbasket", + content = { + @Content( + mediaType = MediaTypes.HAL_JSON_VALUE, + schema = @Schema(implementation = WorkbasketRepresentationModel.class)) + }) + }) @PutMapping(path = RestEndpoints.URL_WORKBASKET_ID) @Transactional(rollbackFor = Exception.class) public ResponseEntity updateWorkbasket( @@ -262,6 +420,28 @@ public ResponseEntity updateWorkbasket( * @throws WorkbasketNotFoundException if the requested Workbasket does not exist. * @throws NotAuthorizedOnWorkbasketException if the current user has not correct permissions */ + @Operation( + summary = "Get all Workbasket Access Items", + description = "This endpoint retrieves all Workbasket Access Items for a given Workbasket.", + parameters = { + @Parameter( + name = "workbasketId", + description = "the Id of the requested Workbasket", + required = true, + example = "WBI:100000000000000000000000000000000001") + }, + responses = { + @ApiResponse( + responseCode = "200", + description = "the access items for the requested Workbasket.", + content = { + @Content( + mediaType = MediaTypes.HAL_JSON_VALUE, + schema = + @Schema( + implementation = WorkbasketAccessItemCollectionRepresentationModel.class)) + }) + }) @GetMapping( path = RestEndpoints.URL_WORKBASKET_ID_ACCESS_ITEMS, produces = MediaTypes.HAL_JSON_VALUE) @@ -295,6 +475,69 @@ public ResponseEntity getWork * in the provided list. * @throws NotAuthorizedOnWorkbasketException if the current user has not correct permissions */ + @Operation( + summary = "Set all Workbasket Access Items", + description = + "This endpoint replaces all Workbasket Access Items for a given Workbasket with the " + + "provided", + parameters = { + @Parameter( + name = "workbasketId", + description = "the Id of the Workbasket whose Workbasket Access Items will be replaced", + required = true, + example = "WBI:100000000000000000000000000000000001") + }, + requestBody = + @io.swagger.v3.oas.annotations.parameters.RequestBody( + description = "the new Workbasket Access Items.", + content = + @Content( + schema = + @Schema( + implementation = + WorkbasketAccessItemCollectionRepresentationModel.class), + examples = + @ExampleObject( + value = + "{\n" + + " \"accessItems\" : [ {\n" + + " \"workbasketId\" : " + + "\"WBI:100000000000000000000000000000000001\",\n" + + " \"accessId\" : \"new-access-id\",\n" + + " \"accessName\" : \"new-access-name\",\n" + + " \"permRead\" : false,\n" + + " \"permReadTasks\" : false,\n" + + " \"permOpen\" : true,\n" + + " \"permAppend\" : false,\n" + + " \"permEditTasks\" : false,\n" + + " \"permTransfer\" : false,\n" + + " \"permDistribute\" : false,\n" + + " \"permCustom1\" : false,\n" + + " \"permCustom2\" : false,\n" + + " \"permCustom3\" : false,\n" + + " \"permCustom4\" : false,\n" + + " \"permCustom5\" : false,\n" + + " \"permCustom6\" : false,\n" + + " \"permCustom7\" : false,\n" + + " \"permCustom8\" : false,\n" + + " \"permCustom9\" : false,\n" + + " \"permCustom10\" : false,\n" + + " \"permCustom11\" : false,\n" + + " \"permCustom12\" : false\n" + + " } ]\n" + + "}"))), + responses = { + @ApiResponse( + responseCode = "200", + description = "the new Workbasket Access Items for the requested Workbasket", + content = { + @Content( + mediaType = MediaTypes.HAL_JSON_VALUE, + schema = + @Schema( + implementation = WorkbasketAccessItemCollectionRepresentationModel.class)) + }) + }) @PutMapping(path = RestEndpoints.URL_WORKBASKET_ID_ACCESS_ITEMS) @Transactional(rollbackFor = Exception.class) public ResponseEntity setWorkbasketAccessItems( @@ -332,6 +575,28 @@ public ResponseEntity setWork * @throws NotAuthorizedOnWorkbasketException if the current user has no read permission for the * specified Workbasket */ + @Operation( + summary = "Get all Distribution Targets for a Workbasket", + description = "This endpoint retrieves all Distribution Targets for a requested Workbasket.", + parameters = { + @Parameter( + name = "workbasketId", + description = "the Id of the Workbasket whose Distribution Targets will be retrieved", + required = true, + example = "WBI:100000000000000000000000000000000002") + }, + responses = { + @ApiResponse( + responseCode = "200", + description = "the Distribution Targets for the requested Workbasket", + content = { + @Content( + mediaType = MediaTypes.HAL_JSON_VALUE, + schema = + @Schema( + implementation = DistributionTargetsCollectionRepresentationModel.class)) + }) + }) @GetMapping( path = RestEndpoints.URL_WORKBASKET_ID_DISTRIBUTION, produces = MediaTypes.HAL_JSON_VALUE) @@ -359,6 +624,41 @@ public ResponseEntity getDistr * the source Workbasket * @throws NotAuthorizedException if the current user has not correct permissions */ + @Operation( + summary = "Set all Distribution Targets for a Workbasket", + description = + "This endpoint replaces all Distribution Targets for a given Workbasket with the " + + "provided ones.", + parameters = { + @Parameter( + name = "workbasketId", + description = "the source Workbasket", + required = true, + example = "WBI:100000000000000000000000000000000001") + }, + requestBody = + @io.swagger.v3.oas.annotations.parameters.RequestBody( + description = "the destination Workbaskets.", + content = + @Content( + array = @ArraySchema(schema = @Schema(implementation = String.class)), + examples = + @ExampleObject( + value = + "[ \"WBI:100000000000000000000000000000000002\", " + + "\"WBI:100000000000000000000000000000000003\" ]"))), + responses = { + @ApiResponse( + responseCode = "200", + description = "the new Distribution Targets for the requested Workbasket.", + content = { + @Content( + mediaType = MediaTypes.HAL_JSON_VALUE, + schema = + @Schema( + implementation = DistributionTargetsCollectionRepresentationModel.class)) + }) + }) @PutMapping(path = RestEndpoints.URL_WORKBASKET_ID_DISTRIBUTION) @Transactional(rollbackFor = Exception.class) public ResponseEntity @@ -388,6 +688,17 @@ public ResponseEntity getDistr * @throws NotAuthorizedException if the requested user ist not ADMIN or BUSINESS_ADMIN. * @throws NotAuthorizedOnWorkbasketException if the current user has not correct permissions */ + @Operation( + summary = "Remove a Workbasket as Distribution Target", + description = + "This endpoint removes all Distribution Target references for a provided Workbasket.", + parameters = { + @Parameter( + name = "workbasketId", + description = "the Id of the requested Workbasket.", + required = true, + example = "WBI:100000000000000000000000000000000007") + }) @DeleteMapping(path = RestEndpoints.URL_WORKBASKET_ID_DISTRIBUTION) @Transactional(rollbackFor = Exception.class) public ResponseEntity removeDistributionTargetForWorkbasketId( diff --git a/rest/taskana-rest-spring/src/main/java/pro/taskana/workbasket/rest/WorkbasketQueryFilterParameter.java b/rest/taskana-rest-spring/src/main/java/pro/taskana/workbasket/rest/WorkbasketQueryFilterParameter.java index df65d82158..3d0743dc71 100644 --- a/rest/taskana-rest-spring/src/main/java/pro/taskana/workbasket/rest/WorkbasketQueryFilterParameter.java +++ b/rest/taskana-rest-spring/src/main/java/pro/taskana/workbasket/rest/WorkbasketQueryFilterParameter.java @@ -1,6 +1,7 @@ package pro.taskana.workbasket.rest; import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.beans.ConstructorProperties; import java.util.Optional; import pro.taskana.common.rest.QueryParameter; @@ -11,6 +12,9 @@ public class WorkbasketQueryFilterParameter implements QueryParameter { /** Filter by the name of the Workbasket. This is an exact match. */ + @Schema( + name = "name", + description = "Filter by the name of the Workbasket. This is an exact match.") @JsonProperty("name") private final String[] name; @@ -19,10 +23,19 @@ public class WorkbasketQueryFilterParameter implements QueryParameter getContent() { return super.getContent(); diff --git a/rest/taskana-rest-spring/src/main/java/pro/taskana/workbasket/rest/models/WorkbasketRepresentationModel.java b/rest/taskana-rest-spring/src/main/java/pro/taskana/workbasket/rest/models/WorkbasketRepresentationModel.java index a3319ca5a9..64903f380c 100644 --- a/rest/taskana-rest-spring/src/main/java/pro/taskana/workbasket/rest/models/WorkbasketRepresentationModel.java +++ b/rest/taskana-rest-spring/src/main/java/pro/taskana/workbasket/rest/models/WorkbasketRepresentationModel.java @@ -1,5 +1,6 @@ package pro.taskana.workbasket.rest.models; +import io.swagger.v3.oas.annotations.media.Schema; import java.time.Instant; import pro.taskana.workbasket.api.models.Workbasket; @@ -11,12 +12,21 @@ public class WorkbasketRepresentationModel extends WorkbasketSummaryRepresentati * *

The format is ISO-8601. */ + @Schema( + name = "created", + description = + "The creation timestamp of the workbasket in the system. The format is ISO-8601.") private Instant created; + /** * The timestamp of the last modification. * *

The format is ISO-8601. */ + @Schema( + name = "modified", + description = + "The timestamp of the last modification. The format is ISO-8601.") private Instant modified; public Instant getCreated() { diff --git a/rest/taskana-rest-spring/src/main/java/pro/taskana/workbasket/rest/models/WorkbasketSummaryRepresentationModel.java b/rest/taskana-rest-spring/src/main/java/pro/taskana/workbasket/rest/models/WorkbasketSummaryRepresentationModel.java index edd24e4f71..b2d0843083 100644 --- a/rest/taskana-rest-spring/src/main/java/pro/taskana/workbasket/rest/models/WorkbasketSummaryRepresentationModel.java +++ b/rest/taskana-rest-spring/src/main/java/pro/taskana/workbasket/rest/models/WorkbasketSummaryRepresentationModel.java @@ -1,5 +1,6 @@ package pro.taskana.workbasket.rest.models; +import io.swagger.v3.oas.annotations.media.Schema; import org.springframework.hateoas.RepresentationModel; import pro.taskana.workbasket.api.WorkbasketType; import pro.taskana.workbasket.api.models.WorkbasketSummary; @@ -9,38 +10,72 @@ public class WorkbasketSummaryRepresentationModel extends RepresentationModel { /** Unique Id. */ + @Schema(name = "workbasketId", description = "Unique Id.") protected String workbasketId; + /** the professional key for the workbasket. */ + @Schema(name = "key", description = "the professional key for the workbasket.") protected String key; + /** The name of the workbasket. */ + @Schema(name = "name", description = "The name of the workbasket.") protected String name; + /** The domain the workbasket belongs to. */ + @Schema(name = "domain", description = "The domain the workbasket belongs to.") protected String domain; + /** The type of the workbasket. */ + @Schema(name = "type", description = "The type of the workbasket.") protected WorkbasketType type; + /** the description of the workbasket. */ + @Schema(name = "description", description = "the description of the workbasket.") protected String description; + /** * The owner of the workbasket. The owner is responsible for the on-time completion of all tasks * in the workbasket. */ + @Schema( + name = "owner", + description = + "The owner of the workbasket. The owner is responsible for the on-time completion of " + + "all tasks in the workbasket.") protected String owner; + /** A custom property with name "1". */ + @Schema(name = "custom1", description = "A custom property with name \"1\".") protected String custom1; + /** A custom property with name "2". */ + @Schema(name = "custom2", description = "A custom property with name \"2\".") protected String custom2; + /** A custom property with name "3". */ + @Schema(name = "custom3", description = "A custom property with name \"3\".") protected String custom3; + /** A custom property with name "4". */ + @Schema(name = "custom4", description = "A custom property with name \"4\".") protected String custom4; + /** A custom property with name "5". */ + @Schema(name = "custom5", description = "A custom property with name \"5\".") protected String custom5; + /** A custom property with name "6". */ + @Schema(name = "custom6", description = "A custom property with name \"6\".") protected String custom6; + /** A custom property with name "7". */ + @Schema(name = "custom7", description = "A custom property with name \"7\".") protected String custom7; + /** A custom property with name "8". */ + @Schema(name = "custom8", description = "A custom property with name \"8\".") protected String custom8; + /** * The first Org Level (the top one). * @@ -48,13 +83,27 @@ public class WorkbasketSummaryRepresentationModel * are used for monitoring and statistical purposes and should reflect who is responsible of the * tasks in the workbasket. */ + @Schema( + name = "orgLevel1", + description = + "The first Org Level (the top one).

The Org Level is an association with an org " + + "hierarchy level in the organization. The values are used for monitoring and " + + "statistical purposes and should reflect who is responsible of the tasks in the" + + " workbasket.") protected String orgLevel1; + /** The second Org Level. */ + @Schema(name = "orgLevel2", description = "The second Org Level.") protected String orgLevel2; + /** The third Org Level. */ + @Schema(name = "orgLevel3", description = "The third Org Level.") protected String orgLevel3; + /** The fourth Org Level (the lowest one). */ + @Schema(name = "orgLevel4", description = "The fourth Org Level.") protected String orgLevel4; + /** Identifier to tell if this workbasket can be deleted. */ private boolean markedForDeletion;