Closes #2608: Remove SpringRestDocs as it has been replaced with OpenAPI
This commit is contained in:
parent
808f1e4690
commit
a670880a7a
|
@ -54,7 +54,7 @@ jobs:
|
|||
- name: Change versions to match tag
|
||||
run: ci/change_version.sh -m .
|
||||
- name: Compile & build
|
||||
run: ./mvnw -B install -DskipTests -Dasciidoctor.skip -Djacoco.skip
|
||||
run: ./mvnw -B install -DskipTests -Djacoco.skip
|
||||
- name: Populate cache
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
|
@ -319,9 +319,6 @@ jobs:
|
|||
run: |
|
||||
ci/change_version.sh -m .
|
||||
ci/update_taskana_dependency_for_wildfly.sh
|
||||
- name: Generate JavaDoc for Rest Documentation
|
||||
if: matrix.module == 'taskana-simplehistory-rest-spring'
|
||||
run: ./mvnw -B validate -pl :taskana-rest-spring
|
||||
- name: Test
|
||||
run: ./mvnw -B verify -pl :${{matrix.module}} -Dcheckstyle.skip
|
||||
env:
|
||||
|
@ -386,7 +383,7 @@ jobs:
|
|||
- name: Release artifacts to OSS Sonatype
|
||||
run: |
|
||||
./mvnw -B deploy -P $([[ "$GITHUB_REF" =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]] && echo "release" || echo "snapshot") \
|
||||
--settings ci/mvnsettings.xml -DskipTests -Dcheckstyle.skip -Dasciidoctor.skip -Djacoco.skip \
|
||||
--settings ci/mvnsettings.xml -DskipTests -Dcheckstyle.skip -Djacoco.skip \
|
||||
-pl :taskana-parent,\
|
||||
:taskana-common-parent,:taskana-common-logging,:taskana-common,:taskana-common-security,\
|
||||
:taskana-common-data,:taskana-common-test,\
|
||||
|
@ -444,8 +441,6 @@ jobs:
|
|||
run: ./mvnw -B install -pl :taskana-web
|
||||
- name: Generate Javadoc
|
||||
run: ./mvnw -B clean javadoc:jar -pl :taskana-core,:taskana-cdi,:taskana-spring
|
||||
- name: Generate Rest Documentation
|
||||
run: ./mvnw -B test asciidoctor:process-asciidoc -Dtest=*DocTest -pl :taskana-rest-spring,:taskana-simplehistory-rest-spring,:taskana-routing-rest -Dcheckstyle.skip -Djacoco.skip
|
||||
- name: Build Example Application
|
||||
run: ./mvnw -B install -P history.plugin -P dmn-routing.plugin -pl :taskana-rest-spring-example-boot -DskipTests -Dcheckstyle.skip -Dmaven.javadoc.skip -Djacoco.skip
|
||||
- name: Verify Example Application contains documentation
|
||||
|
@ -503,7 +498,7 @@ jobs:
|
|||
pattern: ${{ env.ARTIFACTS_JACOCO_REPORTS_NAME }}-*
|
||||
merge-multiple: true
|
||||
- name: Install taskana
|
||||
run: ./mvnw -B install -DskipTests -Dcheckstyle.skip -Dasciidoctor.skip -Dmaven.javadoc.skip
|
||||
run: ./mvnw -B install -DskipTests -Dcheckstyle.skip -Dmaven.javadoc.skip
|
||||
- name: Upload SonarQube analysis
|
||||
run: ./mvnw -B sonar:sonar
|
||||
env:
|
||||
|
|
|
@ -82,19 +82,6 @@
|
|||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.restdocs</groupId>
|
||||
<artifactId>spring-restdocs-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.restdocs</groupId>
|
||||
<artifactId>spring-restdocs-mockmvc</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>capital.scalable</groupId>
|
||||
<artifactId>spring-auto-restdocs-core</artifactId>
|
||||
<version>${version.auto-restdocs}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
|
|
|
@ -112,11 +112,6 @@
|
|||
<artifactId>spring-security-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.restdocs</groupId>
|
||||
<artifactId>spring-restdocs-mockmvc</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.bytebuddy</groupId>
|
||||
<artifactId>byte-buddy</artifactId>
|
||||
|
|
|
@ -1,90 +0,0 @@
|
|||
<!-- Sourcecode at https://stackoverflow.com/questions/34481638/how-to-use-tocify-with-asciidoctor-for-a-dynamic-toc -->
|
||||
<!-- Generate a nice TOC -->
|
||||
<script src="jquery-1.12.4.min.js"></script>
|
||||
<script src="jquery-ui.min.js"></script>
|
||||
<script src="jquery.tocify.min.js"></script>
|
||||
<!-- We do not need the tocify CSS because the asciidoc CSS already provides most of what we need -->
|
||||
|
||||
<style>
|
||||
.tocify-header {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.tocify-subheader {
|
||||
font-style: normal;
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
.tocify ul {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.tocify-focus {
|
||||
color: #7a2518;
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.tocify-focus > a {
|
||||
color: #7a2518;
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 1750px) {
|
||||
#toc.toc2 {
|
||||
width: 25em;
|
||||
}
|
||||
|
||||
#header, #content, #footer, #footnotes {
|
||||
max-width: 80em;
|
||||
}
|
||||
}
|
||||
|
||||
.sect1:not(#_overview) .sect2 + .sect2 {
|
||||
margin-top: 5em;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
// Add a new container for the tocify toc into the existing toc so we can re-use its
|
||||
// styling
|
||||
$("#toc").append("<div id='generated-toc'></div>");
|
||||
$("#generated-toc").tocify({
|
||||
extendPage: true,
|
||||
context: "#content",
|
||||
highlightOnScroll: true,
|
||||
hideEffect: "slideUp",
|
||||
// Use the IDs that asciidoc already provides so that TOC links and intra-document
|
||||
// links are the same. Anything else might confuse users when they create bookmarks.
|
||||
hashGenerator: function (text, element) {
|
||||
return $(element).attr("id");
|
||||
},
|
||||
// Smooth scrolling doesn't work properly if we use the asciidoc IDs
|
||||
smoothScroll: false,
|
||||
// Set to 'none' to use the tocify classes
|
||||
theme: "none",
|
||||
// Handle book (may contain h1) and article (only h2 deeper)
|
||||
selectors: $("#content").has("h1").size() > 0 ? "h1,h2,h3,h4,h5" : "h2,h3,h4,h5",
|
||||
ignoreSelector: ".discrete"
|
||||
});
|
||||
|
||||
// Switch between static asciidoc toc and dynamic tocify toc based on browser size
|
||||
// This is set to match the media selectors in the asciidoc CSS
|
||||
// Without this, we keep the dynamic toc even if it is moved from the side to preamble
|
||||
// position which will cause odd scrolling behavior
|
||||
const handleTocOnResize = function () {
|
||||
if ($(document).width() < 768) {
|
||||
$("#generated-toc").hide();
|
||||
$(".sectlevel0").show();
|
||||
$(".sectlevel1").show();
|
||||
} else {
|
||||
$("#generated-toc").show();
|
||||
$(".sectlevel0").hide();
|
||||
$(".sectlevel1").hide();
|
||||
}
|
||||
}
|
||||
|
||||
$(window).resize(handleTocOnResize);
|
||||
handleTocOnResize();
|
||||
});
|
||||
</script>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,40 +0,0 @@
|
|||
= TASKANA History module RESTful API Documentation
|
||||
|
||||
== Overview
|
||||
This is the REST documentation for http://taskana.pro)[TASKANA]'s simplehistory REST endpoints.
|
||||
|
||||
*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"}
|
||||
|
||||
=== 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 https://restfulapi.net/hateoas/)[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.
|
||||
|
||||
The table below is an addition to the already documented TASKANA REST Service ErrorCodes
|
||||
|
||||
[%autowidth,width="100%"]
|
||||
|===
|
||||
| Status Code | Key | Message Variables
|
||||
| *404 NOT_FOUND* | HISTORY_EVENT_NOT_FOUND | historyEventId
|
||||
|===
|
||||
|
||||
== History event
|
||||
|
||||
include::{snippets}/TaskHistoryEventControllerRestDocTest/getAllTaskHistoryEventsDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskHistoryEventControllerRestDocTest/getSpecificTaskHistoryEventDocTest/auto-section.adoc[]
|
|
@ -156,18 +156,12 @@ public class TaskHistoryQueryFilterParameter implements QueryParameter<TaskHisto
|
|||
return custom4Like;
|
||||
}
|
||||
|
||||
/** Filter by the event type of the Task History Event. This is an exact match. */
|
||||
@Schema(
|
||||
name = "event-type",
|
||||
description = "Filter by the event type of the Task History Event. This is an exact match.")
|
||||
@JsonProperty("event-type")
|
||||
private final String[] eventType;
|
||||
|
||||
/**
|
||||
* Filter by the event type of the Task History Event. This results in a substring search.. (% is
|
||||
* appended to the beginning and end of the requested value). Further SQL "LIKE" wildcard
|
||||
* characters will be resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "event-type-like",
|
||||
description =
|
||||
|
@ -177,18 +171,12 @@ public class TaskHistoryQueryFilterParameter implements QueryParameter<TaskHisto
|
|||
@JsonProperty("event-type-like")
|
||||
private final String[] eventTypeLike;
|
||||
|
||||
/** Filter by the user id of the Task History Event. This is an exact match. */
|
||||
@Schema(
|
||||
name = "user-id",
|
||||
description = "Filter by the user id of the Task History Event. This is an exact match.")
|
||||
@JsonProperty("user-id")
|
||||
private final String[] userId;
|
||||
|
||||
/**
|
||||
* Filter by the user id of the Task History Event. This results in a substring search.. (% is
|
||||
* appended to the beginning and end of the requested value). Further SQL "LIKE" wildcard
|
||||
* characters will be resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "user-id-like",
|
||||
description =
|
||||
|
@ -198,12 +186,6 @@ public class TaskHistoryQueryFilterParameter implements QueryParameter<TaskHisto
|
|||
@JsonProperty("user-id-like")
|
||||
private final String[] userIdLike;
|
||||
|
||||
/**
|
||||
* Filter by a created time interval. The length of the provided values has to be even. To create
|
||||
* an open interval you can either use 'null' or just leave it blank.
|
||||
*
|
||||
* <p>The format is ISO-8601.
|
||||
*/
|
||||
@Schema(
|
||||
name = "created",
|
||||
description =
|
||||
|
@ -212,24 +194,17 @@ public class TaskHistoryQueryFilterParameter implements QueryParameter<TaskHisto
|
|||
+ "format is ISO-8601.")
|
||||
private final Instant[] created;
|
||||
|
||||
/** Filter by the domain of the Task History Event. This is an exact match. */
|
||||
@Schema(
|
||||
name = "domain",
|
||||
description = "Filter by the domain of the Task History Event. This is an exact match.")
|
||||
private final String[] domain;
|
||||
|
||||
/** Filter by the task id of the Task History Event. This is an exact match. */
|
||||
@Schema(
|
||||
name = "task-id",
|
||||
description = "Filter by the task id of the Task History Event. This is an exact match.")
|
||||
@JsonProperty("task-id")
|
||||
private final String[] taskId;
|
||||
|
||||
/**
|
||||
* Filter by the task id of the Task History Event. This results in a substring search.. (% is
|
||||
* appended to the beginning and end of the requested value). Further SQL "LIKE" wildcard
|
||||
* characters will be resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "task-id-like",
|
||||
description =
|
||||
|
@ -239,7 +214,6 @@ public class TaskHistoryQueryFilterParameter implements QueryParameter<TaskHisto
|
|||
@JsonProperty("task-id-like")
|
||||
private final String[] taskIdLike;
|
||||
|
||||
/** Filter by the business process id of the Task History Event. This is an exact match. */
|
||||
@Schema(
|
||||
name = "business-process-id",
|
||||
description =
|
||||
|
@ -247,11 +221,6 @@ public class TaskHistoryQueryFilterParameter implements QueryParameter<TaskHisto
|
|||
@JsonProperty("business-process-id")
|
||||
private final String[] businessProcessId;
|
||||
|
||||
/**
|
||||
* Filter by the business process id of the Task History Event. This results into a substring
|
||||
* search. (% is appended to the beginning and end of the requested value). Further SQL "LIKE"
|
||||
* wildcard characters will be resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "business-process-id-like",
|
||||
description =
|
||||
|
@ -261,7 +230,6 @@ public class TaskHistoryQueryFilterParameter implements QueryParameter<TaskHisto
|
|||
@JsonProperty("business-process-id-like")
|
||||
private final String[] businessProcessIdLike;
|
||||
|
||||
/** Filter by the parent business process id of the Task History Event. This is an exact match. */
|
||||
@Schema(
|
||||
name = "parent-business-process-id",
|
||||
description =
|
||||
|
@ -270,11 +238,6 @@ public class TaskHistoryQueryFilterParameter implements QueryParameter<TaskHisto
|
|||
@JsonProperty("parent-business-process-id")
|
||||
private final String[] parentBusinessProcessId;
|
||||
|
||||
/**
|
||||
* Filter by the parent business process id of the Task History Event. This results into a
|
||||
* substring search. (% is appended to the beginning and end of the requested value). Further SQL
|
||||
* "Like" wildcard characters will be resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "parent-business-process-id-like",
|
||||
description =
|
||||
|
@ -284,7 +247,6 @@ public class TaskHistoryQueryFilterParameter implements QueryParameter<TaskHisto
|
|||
@JsonProperty("parent-business-process-id-like")
|
||||
private final String[] parentBusinessProcessIdLike;
|
||||
|
||||
/** Filter by the task classification key of the Task History Event. This is an exact match. */
|
||||
@Schema(
|
||||
name = "task-classification-key",
|
||||
description =
|
||||
|
@ -293,11 +255,6 @@ public class TaskHistoryQueryFilterParameter implements QueryParameter<TaskHisto
|
|||
@JsonProperty("task-classification-key")
|
||||
private final String[] taskClassificationKey;
|
||||
|
||||
/**
|
||||
* Filter by the task classification key of the Task History Event. This results into a substring
|
||||
* search. (% is appended to the beginning and end of the requested value). Further SQL "LIKE"
|
||||
* wildcard characters will be resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "task-classification-key-like",
|
||||
description =
|
||||
|
@ -307,9 +264,6 @@ public class TaskHistoryQueryFilterParameter implements QueryParameter<TaskHisto
|
|||
@JsonProperty("task-classification-key-like")
|
||||
private final String[] taskClassificationKeyLike;
|
||||
|
||||
/**
|
||||
* Filter by the task classification category of the Task History Event. This is an exact match.
|
||||
*/
|
||||
@Schema(
|
||||
name = "task-classification-category",
|
||||
description =
|
||||
|
@ -318,11 +272,6 @@ public class TaskHistoryQueryFilterParameter implements QueryParameter<TaskHisto
|
|||
@JsonProperty("task-classification-category")
|
||||
private final String[] taskClassificationCategory;
|
||||
|
||||
/**
|
||||
* Filter by the task classification category of the Task History Event. This results into a
|
||||
* substring search. (% is appended to the beginning and end of the requested value). Further SQL
|
||||
* "Like" wildcard characters will be resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "task-classification-category-like",
|
||||
description =
|
||||
|
@ -332,9 +281,6 @@ public class TaskHistoryQueryFilterParameter implements QueryParameter<TaskHisto
|
|||
@JsonProperty("task-classification-category-like")
|
||||
private final String[] taskClassificationCategoryLike;
|
||||
|
||||
/**
|
||||
* Filter by the attachment classification key of the Task History Event. This is an exact match.
|
||||
*/
|
||||
@Schema(
|
||||
name = "attachment-classification-key",
|
||||
description =
|
||||
|
@ -343,11 +289,6 @@ public class TaskHistoryQueryFilterParameter implements QueryParameter<TaskHisto
|
|||
@JsonProperty("attachment-classification-key")
|
||||
private final String[] attachmentClassificationKey;
|
||||
|
||||
/**
|
||||
* Filter by the attachment classification key of the Task History Event. This results into a
|
||||
* substring search. (% is appended to the beginning and end of the requested value). Further SQL
|
||||
* "Like" wildcard characters will be resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "attachment-classification-key-like",
|
||||
description =
|
||||
|
@ -357,7 +298,6 @@ public class TaskHistoryQueryFilterParameter implements QueryParameter<TaskHisto
|
|||
@JsonProperty("attachment-classification-key-like")
|
||||
private final String[] attachmentClassificationKeyLike;
|
||||
|
||||
/** Filter by the workbasket key of the Task History Event. This is an exact match. */
|
||||
@Schema(
|
||||
name = "workbasket-key",
|
||||
description =
|
||||
|
@ -365,11 +305,6 @@ public class TaskHistoryQueryFilterParameter implements QueryParameter<TaskHisto
|
|||
@JsonProperty("workbasket-key")
|
||||
private final String[] workbasketKey;
|
||||
|
||||
/**
|
||||
* Filter by the workbasket key of the Task History Event. This results in a substring search.. (%
|
||||
* is appended to the beginning and end of the requested value). Further SQL "LIKE" wildcard
|
||||
* characters will be resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "workbasket-key-like",
|
||||
description =
|
||||
|
@ -379,10 +314,6 @@ public class TaskHistoryQueryFilterParameter implements QueryParameter<TaskHisto
|
|||
@JsonProperty("workbasket-key-like")
|
||||
private final String[] workbasketKeyLike;
|
||||
|
||||
/**
|
||||
* Filter by the company of the primary object reference of the Task History Event. This is an
|
||||
* exact match.
|
||||
*/
|
||||
@Schema(
|
||||
name = "por-company",
|
||||
description =
|
||||
|
@ -391,11 +322,6 @@ public class TaskHistoryQueryFilterParameter implements QueryParameter<TaskHisto
|
|||
@JsonProperty("por-company")
|
||||
private final String[] porCompany;
|
||||
|
||||
/**
|
||||
* Filter by the company of the primary object reference of the Task History Event. This results
|
||||
* into a substring search. (% is appended to the beginning and end of the requested value).
|
||||
* Further SQL "LIKE" wildcard characters will be resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "por-company-like",
|
||||
description =
|
||||
|
@ -406,10 +332,6 @@ public class TaskHistoryQueryFilterParameter implements QueryParameter<TaskHisto
|
|||
@JsonProperty("por-company-like")
|
||||
private final String[] porCompanyLike;
|
||||
|
||||
/**
|
||||
* Filter by the system of the primary object reference of the Task History Event. This is an
|
||||
* exact match.
|
||||
*/
|
||||
@Schema(
|
||||
name = "por-system",
|
||||
description =
|
||||
|
@ -418,11 +340,6 @@ public class TaskHistoryQueryFilterParameter implements QueryParameter<TaskHisto
|
|||
@JsonProperty("por-system")
|
||||
private final String[] porSystem;
|
||||
|
||||
/**
|
||||
* Filter by the system of the primary object reference of the Task History Event. This results
|
||||
* into a substring search. (% is appended to the beginning and end of the requested value).
|
||||
* Further SQL "LIKE" wildcard characters will be resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "por-system-like",
|
||||
description =
|
||||
|
@ -433,10 +350,6 @@ public class TaskHistoryQueryFilterParameter implements QueryParameter<TaskHisto
|
|||
@JsonProperty("por-system-like")
|
||||
private final String[] porSystemLike;
|
||||
|
||||
/**
|
||||
* Filter by the system instance of the primary object reference of the Task History Event. This
|
||||
* is an exact match.
|
||||
*/
|
||||
@Schema(
|
||||
name = "por-instance",
|
||||
description =
|
||||
|
@ -445,11 +358,6 @@ public class TaskHistoryQueryFilterParameter implements QueryParameter<TaskHisto
|
|||
@JsonProperty("por-instance")
|
||||
private final String[] porInstance;
|
||||
|
||||
/**
|
||||
* Filter by the system instance of the primary object reference of the Task History Event. This
|
||||
* results into a substring search. (% is appended to the beginning and end of the requested
|
||||
* value). Further SQL "LIKE" wildcard characters will be resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "por-instance-like",
|
||||
description =
|
||||
|
@ -460,10 +368,6 @@ public class TaskHistoryQueryFilterParameter implements QueryParameter<TaskHisto
|
|||
@JsonProperty("por-instance-like")
|
||||
private final String[] porInstanceLike;
|
||||
|
||||
/**
|
||||
* Filter by the value of the primary object reference of the Task History Event. This is an exact
|
||||
* match.
|
||||
*/
|
||||
@Schema(
|
||||
name = "por-value",
|
||||
description =
|
||||
|
@ -472,11 +376,6 @@ public class TaskHistoryQueryFilterParameter implements QueryParameter<TaskHisto
|
|||
@JsonProperty("por-value")
|
||||
private final String[] porValue;
|
||||
|
||||
/**
|
||||
* Filter by the value of the primary object reference of the Task History Event. This results
|
||||
* into a substring search. (% is appended to the beginning and end of the requested value).
|
||||
* Further SQL "LIKE" wildcard characters will be resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "por-value-like",
|
||||
description =
|
||||
|
@ -487,18 +386,12 @@ public class TaskHistoryQueryFilterParameter implements QueryParameter<TaskHisto
|
|||
@JsonProperty("por-value-like")
|
||||
private final String[] porValueLike;
|
||||
|
||||
/** Filter by the value of the field custom1. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-1",
|
||||
description = "Filter by the value of the field custom1. This is an exact match.")
|
||||
@JsonProperty("custom-1")
|
||||
private final String[] custom1;
|
||||
|
||||
/**
|
||||
* Filter by the value of the field custom1. This is an exact match. This results into a substring
|
||||
* search. (% is appended to the beginning and end of the requested value). Further SQL "LIKE"
|
||||
* wildcard characters will be resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-1-like",
|
||||
description =
|
||||
|
@ -508,18 +401,12 @@ public class TaskHistoryQueryFilterParameter implements QueryParameter<TaskHisto
|
|||
@JsonProperty("custom-1-like")
|
||||
private final String[] custom1Like;
|
||||
|
||||
/** Filter by the value of the field custom2. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-2",
|
||||
description = "Filter by the value of the field custom2. This is an exact match.")
|
||||
@JsonProperty("custom-2")
|
||||
private final String[] custom2;
|
||||
|
||||
/**
|
||||
* Filter by the value of the field custom2. This is an exact match. This results into a substring
|
||||
* search. (% is appended to the beginning and end of the requested value). Further SQL "LIKE"
|
||||
* wildcard characters will be resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-2-like",
|
||||
description =
|
||||
|
@ -529,18 +416,12 @@ public class TaskHistoryQueryFilterParameter implements QueryParameter<TaskHisto
|
|||
@JsonProperty("custom-2-like")
|
||||
private final String[] custom2Like;
|
||||
|
||||
/** Filter by the value of the field custom3. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-3",
|
||||
description = "Filter by the value of the field custom3. This is an exact match.")
|
||||
@JsonProperty("custom-3")
|
||||
private final String[] custom3;
|
||||
|
||||
/**
|
||||
* Filter by the value of the field custom3. This is an exact match. This results into a substring
|
||||
* search. (% is appended to the beginning and end of the requested value). Further SQL "LIKE"
|
||||
* wildcard characters will be resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-3-like",
|
||||
description =
|
||||
|
@ -550,18 +431,12 @@ public class TaskHistoryQueryFilterParameter implements QueryParameter<TaskHisto
|
|||
@JsonProperty("custom-3-like")
|
||||
private final String[] custom3Like;
|
||||
|
||||
/** Filter by the value of the field custom4. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-4",
|
||||
description = "Filter by the value of the field custom4. This is an exact match.")
|
||||
@JsonProperty("custom-4")
|
||||
private final String[] custom4;
|
||||
|
||||
/**
|
||||
* Filter by the value of the field custom4. This is an exact match. This results into a substring
|
||||
* search. (% is appended to the beginning and end of the requested value). Further SQL "LIKE"
|
||||
* wildcard characters will be resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-4-like",
|
||||
description =
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
package pro.taskana.simplehistory.rest;
|
||||
|
||||
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.get;
|
||||
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
|
||||
import pro.taskana.rest.test.BaseRestDocTest;
|
||||
|
||||
@Disabled
|
||||
class TaskHistoryEventControllerRestDocTest extends BaseRestDocTest {
|
||||
|
||||
@Test
|
||||
void getAllTaskHistoryEventsDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(get(HistoryRestEndpoints.URL_HISTORY_EVENTS + "?page=1&page-size=3"))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void getSpecificTaskHistoryEventDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(
|
||||
get(
|
||||
HistoryRestEndpoints.URL_HISTORY_EVENTS_ID,
|
||||
"THI:000000000000000000000000000000000000"))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
}
|
2
pom.xml
2
pom.xml
|
@ -54,7 +54,6 @@
|
|||
<version.maven.javadoc>3.8.0</version.maven.javadoc>
|
||||
<version.maven.resources>3.3.1</version.maven.resources>
|
||||
<version.maven.surefire>3.3.1</version.maven.surefire>
|
||||
<version.maven.asciidoctor>3.0.0</version.maven.asciidoctor>
|
||||
<version.maven.clean>3.2.0</version.maven.clean>
|
||||
<version.maven.dependency>3.7.1</version.maven.dependency>
|
||||
<version.maven.sonar>3.11.0.3922</version.maven.sonar>
|
||||
|
@ -88,7 +87,6 @@
|
|||
<version.openpojo>0.9.1</version.openpojo>
|
||||
<version.jacoco>0.8.12</version.jacoco>
|
||||
<version.slf4j-test>3.0.1</version.slf4j-test>
|
||||
<version.auto-restdocs>2.0.11</version.auto-restdocs>
|
||||
<version.testcontainers>1.20.0</version.testcontainers>
|
||||
<version.spring-openapi>2.5.0</version.spring-openapi>
|
||||
|
||||
|
|
|
@ -67,36 +67,6 @@
|
|||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>${version.maven.resources}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-history-rest-documentation-to-static-folder</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>
|
||||
${project.build.outputDirectory}/static/docs/rest
|
||||
</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>
|
||||
../../history/taskana-simplehistory-rest-spring/target/generated-docs
|
||||
</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>historyLogging.plugin</id>
|
||||
|
@ -156,36 +126,6 @@
|
|||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>${version.maven.resources}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-routing-rest-documentation-to-static-folder</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>
|
||||
${project.build.outputDirectory}/static/docs/rest
|
||||
</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>
|
||||
../../routing/taskana-routing-rest/target/generated-docs
|
||||
</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
|
@ -214,25 +154,6 @@
|
|||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>${version.maven.resources}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-rest-documentation-to-static-folder</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>
|
||||
${project.build.outputDirectory}/static/docs/rest
|
||||
</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>
|
||||
../taskana-rest-spring/target/generated-docs
|
||||
</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-taskana-core-docs</id>
|
||||
<phase>prepare-package</phase>
|
||||
|
|
|
@ -72,19 +72,6 @@
|
|||
<groupId>org.springframework.hateoas</groupId>
|
||||
<artifactId>spring-hateoas</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.restdocs</groupId>
|
||||
<artifactId>spring-restdocs-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.restdocs</groupId>
|
||||
<artifactId>spring-restdocs-mockmvc</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>capital.scalable</groupId>
|
||||
<artifactId>spring-auto-restdocs-core</artifactId>
|
||||
<version>${version.auto-restdocs}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
|
|
|
@ -1,109 +0,0 @@
|
|||
package pro.taskana.rest.test;
|
||||
|
||||
import static org.springframework.security.test.web.servlet.setup.SecurityMockMvcConfigurers.springSecurity;
|
||||
|
||||
import capital.scalable.restdocs.AutoDocumentation;
|
||||
import capital.scalable.restdocs.SnippetRegistry;
|
||||
import capital.scalable.restdocs.jackson.JacksonResultHandlers;
|
||||
import capital.scalable.restdocs.response.ResponseModifyingPreprocessors;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreType;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.hateoas.Links;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.restdocs.RestDocumentationContextProvider;
|
||||
import org.springframework.restdocs.RestDocumentationExtension;
|
||||
import org.springframework.restdocs.cli.CliDocumentation;
|
||||
import org.springframework.restdocs.http.HttpDocumentation;
|
||||
import org.springframework.restdocs.mockmvc.MockMvcRestDocumentation;
|
||||
import org.springframework.restdocs.mockmvc.RestDocumentationResultHandler;
|
||||
import org.springframework.restdocs.operation.preprocess.Preprocessors;
|
||||
import org.springframework.restdocs.snippet.Snippet;
|
||||
import org.springframework.test.web.servlet.MockMvc;
|
||||
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
|
||||
import org.springframework.test.web.servlet.request.RequestPostProcessor;
|
||||
import org.springframework.test.web.servlet.setup.ConfigurableMockMvcBuilder;
|
||||
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
|
||||
import org.springframework.test.web.servlet.setup.MockMvcConfigurerAdapter;
|
||||
import org.springframework.web.context.WebApplicationContext;
|
||||
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter;
|
||||
|
||||
@TaskanaSpringBootTest
|
||||
@ExtendWith(RestDocumentationExtension.class)
|
||||
public class BaseRestDocTest {
|
||||
|
||||
protected MockMvc mockMvc;
|
||||
@Autowired protected ObjectMapper objectMapper;
|
||||
@Autowired protected RestHelper restHelper;
|
||||
@Autowired private RequestMappingHandlerAdapter requestMappingHandlerAdapter;
|
||||
|
||||
@BeforeEach
|
||||
public void setUp(
|
||||
WebApplicationContext webApplicationContext,
|
||||
RestDocumentationContextProvider restDocumentation) {
|
||||
objectMapper = objectMapper.addMixIn(Links.class, MixInIgnoreType.class);
|
||||
this.mockMvc =
|
||||
MockMvcBuilders.webAppContextSetup(webApplicationContext)
|
||||
.apply(springSecurity())
|
||||
.apply(configureAdminHeadersAsDefault())
|
||||
.alwaysDo(JacksonResultHandlers.prepareJackson(objectMapper))
|
||||
.alwaysDo(commonDocumentation())
|
||||
.apply(
|
||||
MockMvcRestDocumentation.documentationConfiguration(restDocumentation)
|
||||
.snippets()
|
||||
.withDefaults(
|
||||
CliDocumentation.curlRequest(),
|
||||
HttpDocumentation.httpRequest(),
|
||||
HttpDocumentation.httpResponse(),
|
||||
AutoDocumentation.requestFields().failOnUndocumentedFields(true),
|
||||
AutoDocumentation.responseFields().failOnUndocumentedFields(true),
|
||||
AutoDocumentation.pathParameters().failOnUndocumentedParams(true),
|
||||
AutoDocumentation.requestParameters().failOnUndocumentedParams(true),
|
||||
AutoDocumentation.description(),
|
||||
AutoDocumentation.methodAndPath(),
|
||||
AutoDocumentation.modelAttribute(
|
||||
requestMappingHandlerAdapter.getArgumentResolvers()),
|
||||
AutoDocumentation.sectionBuilder()
|
||||
.snippetNames(
|
||||
SnippetRegistry.AUTO_AUTHORIZATION,
|
||||
SnippetRegistry.AUTO_PATH_PARAMETERS,
|
||||
SnippetRegistry.AUTO_REQUEST_PARAMETERS,
|
||||
SnippetRegistry.AUTO_MODELATTRIBUTE,
|
||||
SnippetRegistry.AUTO_REQUEST_FIELDS,
|
||||
SnippetRegistry.AUTO_RESPONSE_FIELDS,
|
||||
SnippetRegistry.AUTO_LINKS,
|
||||
SnippetRegistry.HTTP_REQUEST,
|
||||
SnippetRegistry.HTTP_RESPONSE)
|
||||
.build()))
|
||||
.build();
|
||||
}
|
||||
|
||||
protected RestDocumentationResultHandler commonDocumentation(Snippet... snippets) {
|
||||
return MockMvcRestDocumentation.document(
|
||||
"{ClassName}/{methodName}",
|
||||
Preprocessors.preprocessRequest(Preprocessors.prettyPrint()),
|
||||
Preprocessors.preprocessResponse(
|
||||
ResponseModifyingPreprocessors.replaceBinaryContent(),
|
||||
ResponseModifyingPreprocessors.limitJsonArrayLength(objectMapper),
|
||||
Preprocessors.prettyPrint()),
|
||||
snippets);
|
||||
}
|
||||
|
||||
private MockMvcConfigurerAdapter configureAdminHeadersAsDefault() {
|
||||
return new MockMvcConfigurerAdapter() {
|
||||
@Override
|
||||
public RequestPostProcessor beforeMockMvcCreated(
|
||||
@NonNull ConfigurableMockMvcBuilder<?> builder, @NonNull WebApplicationContext cxt) {
|
||||
builder.defaultRequest(
|
||||
MockMvcRequestBuilders.post("/test")
|
||||
.headers(RestHelper.generateHeadersForUser("admin")));
|
||||
return super.beforeMockMvcCreated(builder, cxt);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@JsonIgnoreType
|
||||
public static class MixInIgnoreType {}
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
{{#hasContent}}[%autowidth,width="100%"]
|
||||
|===
|
||||
|{{th-path}}|{{th-optional}}|{{th-description}}
|
||||
|
||||
{{#content}}
|
||||
|{{path}}
|
||||
|{{optional}}
|
||||
|{{description}}
|
||||
|
||||
{{/content}}
|
||||
|==={{/hasContent}}{{#noContent}}{{no-links}}{{/noContent}}
|
|
@ -1,12 +0,0 @@
|
|||
{{#hasContent}}[%autowidth,width="100%"]
|
||||
|===
|
||||
|{{th-parameter}}|{{th-type}}|{{th-optional}}|{{th-description}}
|
||||
|
||||
{{#content}}
|
||||
|{{path}}
|
||||
|{{type}}
|
||||
|{{optional}}
|
||||
|{{description}}
|
||||
|
||||
{{/content}}
|
||||
|==={{/hasContent}}{{#noContent}}{{no-params}}{{/noContent}}
|
|
@ -1,12 +0,0 @@
|
|||
{{#hasContent}}[%autowidth,width="100%"]
|
||||
|===
|
||||
|{{th-path}}|{{th-type}}|{{th-optional}}|{{th-description}}
|
||||
|
||||
{{#content}}
|
||||
|{{path}}
|
||||
|{{type}}
|
||||
|{{optional}}
|
||||
|{{description}}
|
||||
|
||||
{{/content}}
|
||||
|==={{/hasContent}}{{#noContent}}{{no-request-body}}{{/noContent}}
|
|
@ -1,14 +0,0 @@
|
|||
{{#isPageRequest}}{{pagination-request-adoc}}
|
||||
|
||||
{{/isPageRequest}}{{#hasContent}}[%autowidth,width="100%"]
|
||||
|===
|
||||
|{{th-parameter}}|{{th-type}}|{{th-optional}}|{{th-description}}
|
||||
|
||||
{{#content}}
|
||||
|{{path}}
|
||||
|{{type}}
|
||||
|{{optional}}
|
||||
|{{description}}
|
||||
|
||||
{{/content}}
|
||||
|==={{/hasContent}}{{#noContent}}{{no-params}}{{/noContent}}
|
|
@ -1,14 +0,0 @@
|
|||
{{#hasContent}}{{#isPageResponse}}{{pagination-response-adoc}}
|
||||
|
||||
{{/isPageResponse}}[%autowidth,width="100%"]
|
||||
|===
|
||||
|{{th-path}}|{{th-type}}|{{th-optional}}|{{th-description}}
|
||||
|
||||
{{#content}}
|
||||
|{{path}}
|
||||
|{{type}}
|
||||
|{{optional}}
|
||||
|{{description}}
|
||||
|
||||
{{/content}}
|
||||
|==={{/hasContent}}{{#noContent}}{{no-response-body}}{{/noContent}}
|
|
@ -1,90 +0,0 @@
|
|||
<!-- Sourcecode at https://stackoverflow.com/questions/34481638/how-to-use-tocify-with-asciidoctor-for-a-dynamic-toc -->
|
||||
<!-- Generate a nice TOC -->
|
||||
<script src="jquery-1.12.4.min.js"></script>
|
||||
<script src="jquery-ui.min.js"></script>
|
||||
<script src="jquery.tocify.min.js"></script>
|
||||
<!-- We do not need the tocify CSS because the asciidoc CSS already provides most of what we need -->
|
||||
|
||||
<style>
|
||||
.tocify-header {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.tocify-subheader {
|
||||
font-style: normal;
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
.tocify ul {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.tocify-focus {
|
||||
color: #7a2518;
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.tocify-focus > a {
|
||||
color: #7a2518;
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 1750px) {
|
||||
#toc.toc2 {
|
||||
width: 25em;
|
||||
}
|
||||
|
||||
#header, #content, #footer, #footnotes {
|
||||
max-width: 80em;
|
||||
}
|
||||
}
|
||||
|
||||
.sect1:not(#_overview) .sect2 + .sect2 {
|
||||
margin-top: 5em;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
// Add a new container for the tocify toc into the existing toc so we can re-use its
|
||||
// styling
|
||||
$("#toc").append("<div id='generated-toc'></div>");
|
||||
$("#generated-toc").tocify({
|
||||
extendPage: true,
|
||||
context: "#content",
|
||||
highlightOnScroll: true,
|
||||
hideEffect: "slideUp",
|
||||
// Use the IDs that asciidoc already provides so that TOC links and intra-document
|
||||
// links are the same. Anything else might confuse users when they create bookmarks.
|
||||
hashGenerator: function (text, element) {
|
||||
return $(element).attr("id");
|
||||
},
|
||||
// Smooth scrolling doesn't work properly if we use the asciidoc IDs
|
||||
smoothScroll: false,
|
||||
// Set to 'none' to use the tocify classes
|
||||
theme: "none",
|
||||
// Handle book (may contain h1) and article (only h2 deeper)
|
||||
selectors: $("#content").has("h1").size() > 0 ? "h1,h2,h3,h4,h5" : "h2,h3,h4,h5",
|
||||
ignoreSelector: ".discrete"
|
||||
});
|
||||
|
||||
// Switch between static asciidoc toc and dynamic tocify toc based on browser size
|
||||
// This is set to match the media selectors in the asciidoc CSS
|
||||
// Without this, we keep the dynamic toc even if it is moved from the side to preamble
|
||||
// position which will cause odd scrolling behavior
|
||||
const handleTocOnResize = function () {
|
||||
if ($(document).width() < 768) {
|
||||
$("#generated-toc").hide();
|
||||
$(".sectlevel0").show();
|
||||
$(".sectlevel1").show();
|
||||
} else {
|
||||
$("#generated-toc").show();
|
||||
$(".sectlevel0").hide();
|
||||
$(".sectlevel1").hide();
|
||||
}
|
||||
}
|
||||
|
||||
$(window).resize(handleTocOnResize);
|
||||
handleTocOnResize();
|
||||
});
|
||||
</script>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,200 +0,0 @@
|
|||
= TASKANA RESTful API Documentation
|
||||
|
||||
== Overview
|
||||
|
||||
This is the REST documentation for http://taskana.pro)[TASKANA] - 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 https://restfulapi.net/hateoas/)[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.
|
||||
|
||||
[%autowidth,width="100%"]
|
||||
|===
|
||||
| Status Code | Key | Message Variables
|
||||
| *400 BAD_REQUEST* | CLASSIFICATION_SERVICE_LEVEL_MALFORMED | serviceLevel, classificationKey, domain
|
||||
| *400 BAD_REQUEST* | CUSTOM_HOLIDAY_WRONG_FORMAT | customHoliday
|
||||
| *400 BAD_REQUEST* | DOMAIN_NOT_FOUND | domain
|
||||
| *400 BAD_REQUEST* | INVALID_ARGUMENT |
|
||||
| *400 BAD_REQUEST* | QUERY_PARAMETER_MALFORMED | malformedQueryParameters
|
||||
| *400 BAD_REQUEST* | TASK_INVALID_CALLBACK_STATE | taskId, taskCallbackState, requiredCallbackStates
|
||||
| *400 BAD_REQUEST* | TASK_INVALID_OWNER | taskId, currentUserId
|
||||
| *400 BAD_REQUEST* | TASK_INVALID_STATE | taskId, taskState, requiredTaskStates
|
||||
| *403 FORBIDDEN* | NOT_AUTHORIZED | roles, currentUserId
|
||||
| *403 FORBIDDEN* | NOT_AUTHORIZED_ON_TASK_COMMENT | currentUserId, taskCommentId
|
||||
| *403 FORBIDDEN* | NOT_AUTHORIZED_ON_WORKBASKET_WITH_ID | currentUserId, workbasketId, requiredPermissions
|
||||
| *403 FORBIDDEN* | NOT_AUTHORIZED_ON_WORKBASKET_WITH_KEY_AND_DOMAIN | currentUserId, workbasketKey, domain, requiredPermissions
|
||||
| *404 NOT_FOUND* | CLASSIFICATION_WITH_ID_NOT_FOUND | classificationId
|
||||
| *404 NOT_FOUND* | CLASSIFICATION_WITH_KEY_NOT_FOUND | classificationKey, domain
|
||||
| *404 NOT_FOUND* | TASK_COMMENT_NOT_FOUND | taskCommentId
|
||||
| *404 NOT_FOUND* | TASK_NOT_FOUND | taskId
|
||||
| *404 NOT_FOUND* | USER_NOT_FOUND | userId
|
||||
| *404 NOT_FOUND* | WORKBASKET_WITH_ID_NOT_FOUND | workbasketId
|
||||
| *404 NOT_FOUND* | WORKBASKET_WITH_KEY_NOT_FOUND | workbasketKey, domain
|
||||
| *409 CONFLICT* | ATTACHMENT_ALREADY_EXISTS | attachmentId, taskId
|
||||
| *409 CONFLICT* | CLASSIFICATION_ALREADY_EXISTS | classificationKey, domain
|
||||
| *409 CONFLICT* | ENTITY_NOT_UP_TO_DATE | entityId
|
||||
| *409 CONFLICT* | TASK_ALREADY_EXISTS | externalTaskId
|
||||
| *409 CONFLICT* | USER_ALREADY_EXISTS | userID
|
||||
| *409 CONFLICT* | WORKBASKET_ACCESS_ITEM_ALREADY_EXISTS | accessId, workbasketId
|
||||
| *409 CONFLICT* | WORKBASKET_ALREADY_EXISTS | workbasketKey, domain
|
||||
| *409 CONFLICT* | WORKBASKET_MARKED_FOR_DELETION | workbasketId
|
||||
| *413 PAYLOAD_TOO_LARGE* | PAYLOAD_TOO_LARGE |
|
||||
| *423 LOCKED* | CLASSIFICATION_IN_USE | classificationKey, domain
|
||||
| *423 LOCKED* | WORKBASKET_IN_USE | workbasketId
|
||||
| *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_UNSUPPORTED | databaseProductName
|
||||
| *500 INTERNAL_SERVER_ERROR* | UNKNOWN_ERROR |
|
||||
|===
|
||||
|
||||
==== Errors
|
||||
|
||||
|====
|
||||
| Message Variables | Type
|
||||
| accessId | String
|
||||
| attachmentId | String
|
||||
| classificationId | String
|
||||
| classificationKey | String
|
||||
| currentUserId | String
|
||||
| customHoliday | String
|
||||
| databaseProductName | String
|
||||
| domain | String
|
||||
| externalTaskId | String
|
||||
| historyEventId | String
|
||||
| malformedQueryParameters | MalformedQueryParameter[]
|
||||
| requiredCallbackStates | CallbackState[]
|
||||
| requiredPermissions | WorkbasketPermission[]
|
||||
| requiredTaskStates | TaskState[]
|
||||
| roles | TaskanaRole[]
|
||||
| taskCallbackState | CallbackState
|
||||
| taskCommentId | String
|
||||
| taskId | String
|
||||
| taskState | TaskState
|
||||
| workbasketId | String
|
||||
| workbasketKey | String
|
||||
|====
|
||||
|
||||
== Task Resource
|
||||
|
||||
include::{snippets}/TaskControllerRestDocTest/createTaskDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskControllerRestDocTest/getSpecificTaskDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskControllerRestDocTest/getAllTasksDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskControllerRestDocTest/updateTaskDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskControllerRestDocTest/claimTaskDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskControllerRestDocTest/forceClaimTaskDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskControllerRestDocTest/selectAndClaimTaskDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskControllerRestDocTest/cancelClaimTaskDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskControllerRestDocTest/forceCancelClaimTaskDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskControllerRestDocTest/requestReviewTaskDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskControllerRestDocTest/forceRequestReviewTaskDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskControllerRestDocTest/requestChangesTaskDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskControllerRestDocTest/forceRequestChangesTaskDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskControllerRestDocTest/completeTaskDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskControllerRestDocTest/forceCompleteTaskDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskControllerRestDocTest/cancelTaskDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskControllerRestDocTest/terminateTaskDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskControllerRestDocTest/transferTaskDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskControllerRestDocTest/setTaskReadDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskControllerRestDocTest/deleteTaskDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskControllerRestDocTest/forceDeleteTaskDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskControllerRestDocTest/deleteTasksDocTest/auto-section.adoc[]
|
||||
|
||||
== Task Comment Resource
|
||||
|
||||
include::{snippets}/TaskCommentControllerRestDocTest/createTaskCommentDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskCommentControllerRestDocTest/getSpecificTaskCommentDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskCommentControllerRestDocTest/getAllTaskCommentsForSpecificTaskDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskCommentControllerRestDocTest/updateTaskCommentDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskCommentControllerRestDocTest/deleteTaskCommentDocTest/auto-section.adoc[]
|
||||
|
||||
== Classification Resource
|
||||
|
||||
include::{snippets}/ClassificationControllerRestDocTest/createClassificationDocTest/auto-section.adoc[]
|
||||
include::{snippets}/ClassificationControllerRestDocTest/getClassificationDocTest/auto-section.adoc[]
|
||||
include::{snippets}/ClassificationControllerRestDocTest/getAllClassificationsDocTest/auto-section.adoc[]
|
||||
include::{snippets}/ClassificationControllerRestDocTest/updateClassificationDocTest/auto-section.adoc[]
|
||||
include::{snippets}/ClassificationControllerRestDocTest/deleteClassificationDocTest/auto-section.adoc[]
|
||||
|
||||
== Workbasket Resource
|
||||
|
||||
include::{snippets}/WorkbasketControllerRestDocTest/createWorkbasketDocTest/auto-section.adoc[]
|
||||
include::{snippets}/WorkbasketControllerRestDocTest/getSpecificWorkbasketDocTest/auto-section.adoc[]
|
||||
include::{snippets}/WorkbasketControllerRestDocTest/getAllWorkbasketsDocTest/auto-section.adoc[]
|
||||
include::{snippets}/WorkbasketControllerRestDocTest/getAllWorkbasketAccessItemsDocTest/auto-section.adoc[]
|
||||
include::{snippets}/WorkbasketControllerRestDocTest/getAllWorkbasketDistributionTargetsDocTest/auto-section.adoc[]
|
||||
include::{snippets}/WorkbasketControllerRestDocTest/updateWorkbasketDocTest/auto-section.adoc[]
|
||||
include::{snippets}/WorkbasketControllerRestDocTest/removeWorkbasketAsDistributionTargetDocTest/auto-section.adoc[]
|
||||
include::{snippets}/WorkbasketControllerRestDocTest/setAllWorkbasketAccessItemsDocTest/auto-section.adoc[]
|
||||
include::{snippets}/WorkbasketControllerRestDocTest/setAllDistributionTargetsDocTest/auto-section.adoc[]
|
||||
include::{snippets}/WorkbasketControllerRestDocTest/deleteWorkbasketDocTest/auto-section.adoc[]
|
||||
|
||||
== Workbasket Access Item Resource
|
||||
|
||||
include::{snippets}/WorkbasketAccessItemControllerRestDocTest/getWorkbasketAccessItemsDocTest/auto-section.adoc[]
|
||||
include::{snippets}/WorkbasketAccessItemControllerRestDocTest/removeWorkbasketAccessItemsDocTest/auto-section.adoc[]
|
||||
|
||||
== Monitoring Resources
|
||||
|
||||
include::{snippets}/MonitorControllerRestDocTest/computeWorkbasketReportDocTest/auto-section.adoc[]
|
||||
include::{snippets}/MonitorControllerRestDocTest/computeWorkbasketPriorityReportDocTest/auto-section.adoc[]
|
||||
include::{snippets}/MonitorControllerRestDocTest/computeClassificationCategoryReportDocTest/auto-section.adoc[]
|
||||
include::{snippets}/MonitorControllerRestDocTest/computeClassificationReportDocTest/auto-section.adoc[]
|
||||
include::{snippets}/MonitorControllerRestDocTest/computeDetailedClassificationReportDocTest/auto-section.adoc[]
|
||||
include::{snippets}/MonitorControllerRestDocTest/computeTaskCustomFieldValueReportDocTest/auto-section.adoc[]
|
||||
include::{snippets}/MonitorControllerRestDocTest/computeTaskStatusReportDocTest/auto-section.adoc[]
|
||||
include::{snippets}/MonitorControllerRestDocTest/computeTimestampReportDocTest/auto-section.adoc[]
|
||||
|
||||
== Access Id Resource
|
||||
|
||||
include::{snippets}/AccessIdControllerRestDocTest/searchForAccessIdDocTest/auto-section.adoc[]
|
||||
include::{snippets}/AccessIdControllerRestDocTest/getGroupsForAccessIdDocTest/auto-section.adoc[]
|
||||
include::{snippets}/AccessIdControllerRestDocTest/searchUsersByNameOrAccessIdForRoleTest/auto-section.adoc[]
|
||||
|
||||
== User Resource
|
||||
|
||||
include::{snippets}/UserControllerRestDocTest/getUserDocTest/auto-section.adoc[]
|
||||
include::{snippets}/UserControllerRestDocTest/getUsersDocTest/auto-section.adoc[]
|
||||
include::{snippets}/UserControllerRestDocTest/createUserDocTest/auto-section.adoc[]
|
||||
include::{snippets}/UserControllerRestDocTest/updateUserDocTest/auto-section.adoc[]
|
||||
include::{snippets}/UserControllerRestDocTest/deleteUserDocTest/auto-section.adoc[]
|
||||
|
||||
== Configuration Resources
|
||||
|
||||
include::{snippets}/TaskanaEngineControllerRestDocTest/getAllDomainsDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskanaEngineControllerRestDocTest/getClassificationCategoriesDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskanaEngineControllerRestDocTest/getClassificationTypesDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskanaEngineControllerRestDocTest/getClassificationCategoriesByTypeMapDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskanaEngineControllerRestDocTest/getCurrentUserInfoDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskanaEngineControllerRestDocTest/getHistoryProviderIsEnabledDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskanaEngineControllerRestDocTest/getCurrentVersionDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskanaEngineControllerRestDocTest/getCustomConfigurationAttributesDocTest/auto-section.adoc[]
|
||||
include::{snippets}/TaskanaEngineControllerRestDocTest/setCustomConfigurationAttributesDocTest/auto-section.adoc[]
|
||||
|
||||
== Import / Export
|
||||
|
||||
include::{snippets}/ClassificationDefinitionControllerRestDocTest/exportClassificationDefinitionsDocTest/auto-section.adoc[]
|
||||
include::{snippets}/ClassificationDefinitionControllerRestDocTest/importClassificationDefinitionsDocTest/auto-section.adoc[]
|
||||
include::{snippets}/WorkbasketDefinitionControllerRestDocTest/exportWorkbasketDefinitionsDocTest/auto-section.adoc[]
|
||||
include::{snippets}/WorkbasketDefinitionControllerRestDocTest/importWorkbasketDefinitionDocTest/auto-section.adoc[]
|
|
@ -65,13 +65,6 @@ public class ClassificationDefinitionController {
|
|||
this.assembler = assembler;
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint exports all configured Classifications.
|
||||
*
|
||||
* @title Export Classifications
|
||||
* @param domain Filter the export by domain
|
||||
* @return the configured Classifications.
|
||||
*/
|
||||
@Operation(
|
||||
summary = "Export Classifications",
|
||||
description = "This endpoint exports all configured Classifications.",
|
||||
|
@ -108,23 +101,6 @@ public class ClassificationDefinitionController {
|
|||
return ResponseEntity.ok(collectionModel);
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint imports all Classifications. Existing Classifications will not be removed.
|
||||
* Existing Classifications with the same key/domain will be overridden.
|
||||
*
|
||||
* @title Import Classifications
|
||||
* @param file the file containing the Classifications which should be imported.
|
||||
* @return nothing
|
||||
* @throws InvalidArgumentException if any Classification within the import file is invalid
|
||||
* @throws NotAuthorizedException if the current user is not authorized to import Classifications
|
||||
* @throws ConcurrencyException TODO: this makes no sense
|
||||
* @throws ClassificationNotFoundException TODO: this makes no sense
|
||||
* @throws ClassificationAlreadyExistException TODO: this makes no sense
|
||||
* @throws DomainNotFoundException if the domain for a specific Classification does not exist
|
||||
* @throws IOException if the import file could not be parsed
|
||||
* @throws MalformedServiceLevelException if the {@code serviceLevel} property does not comply *
|
||||
* with the ISO 8601 specification
|
||||
*/
|
||||
@Operation(
|
||||
summary = "Import Classifications",
|
||||
description =
|
||||
|
|
|
@ -72,18 +72,12 @@ public class ClassificationQueryFilterParameter
|
|||
return custom8Like;
|
||||
}
|
||||
|
||||
/** Filter by the name of the Classification. This is an exact match. */
|
||||
@Schema(
|
||||
name = "name",
|
||||
description = "Filter by the name of the Classification. This is an exact match.")
|
||||
@JsonProperty("name")
|
||||
private final String[] name;
|
||||
|
||||
/**
|
||||
* Filter by the name of the Classification. This results in a substring search. (% is appended to
|
||||
* the beginning and end of the requested value). Further SQL "LIKE" wildcard characters will be
|
||||
* resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "name-like",
|
||||
description =
|
||||
|
@ -93,39 +87,30 @@ public class ClassificationQueryFilterParameter
|
|||
@JsonProperty("name-like")
|
||||
private final String[] nameLike;
|
||||
|
||||
/** Filter by the key of the Classification. This is an exact match. */
|
||||
@Schema(
|
||||
name = "key",
|
||||
description = "Filter by the key of the Classification. This is an exact match.")
|
||||
@JsonProperty("key")
|
||||
private final String[] key;
|
||||
|
||||
/** Filter by the category of the Classification. This is an exact match. */
|
||||
@Schema(
|
||||
name = "category",
|
||||
description = "Filter by the category of the Classification. This is an exact match.")
|
||||
@JsonProperty("category")
|
||||
private final String[] category;
|
||||
|
||||
/** Filter by the domain of the Classification. This is an exact match. */
|
||||
@Schema(
|
||||
name = "domain",
|
||||
description = "Filter by the domain of the Classification. This is an exact match.")
|
||||
@JsonProperty("domain")
|
||||
private final String[] domain;
|
||||
|
||||
/** Filter by the type of the Classification. This is an exact match. */
|
||||
@Schema(
|
||||
name = "type",
|
||||
description = "Filter by the type of the Classification. This is an exact match.")
|
||||
@JsonProperty("type")
|
||||
private final String[] type;
|
||||
|
||||
/**
|
||||
* Filter by the value of the field custom1. This results in a substring search.. (% is appended
|
||||
* to the beginning and end of the requested value). Further SQL "LIKE" wildcard characters will
|
||||
* be resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-1-like",
|
||||
description =
|
||||
|
@ -135,11 +120,6 @@ public class ClassificationQueryFilterParameter
|
|||
@JsonProperty("custom-1-like")
|
||||
private final String[] custom1Like;
|
||||
|
||||
/**
|
||||
* Filter by the value of the field custom2. This results in a substring search.. (% is appended
|
||||
* to the beginning and end of the requested value). Further SQL "LIKE" wildcard characters will
|
||||
* be resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-2-like",
|
||||
description =
|
||||
|
@ -149,11 +129,6 @@ public class ClassificationQueryFilterParameter
|
|||
@JsonProperty("custom-2-like")
|
||||
private final String[] custom2Like;
|
||||
|
||||
/**
|
||||
* Filter by the value of the field custom3. This results in a substring search.. (% is appended
|
||||
* to the beginning and end of the requested value). Further SQL "LIKE" wildcard characters will
|
||||
* be resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-3-like",
|
||||
description =
|
||||
|
@ -163,11 +138,6 @@ public class ClassificationQueryFilterParameter
|
|||
@JsonProperty("custom-3-like")
|
||||
private final String[] custom3Like;
|
||||
|
||||
/**
|
||||
* Filter by the value of the field custom4. This results in a substring search.. (% is appended
|
||||
* to the beginning and end of the requested value). Further SQL "LIKE" wildcard characters will
|
||||
* be resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-4-like",
|
||||
description =
|
||||
|
@ -177,11 +147,6 @@ public class ClassificationQueryFilterParameter
|
|||
@JsonProperty("custom-4-like")
|
||||
private final String[] custom4Like;
|
||||
|
||||
/**
|
||||
* Filter by the value of the field custom5. This results in a substring search.. (% is appended
|
||||
* to the beginning and end of the requested value). Further SQL "LIKE" wildcard characters will
|
||||
* be resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-5-like",
|
||||
description =
|
||||
|
@ -191,11 +156,6 @@ public class ClassificationQueryFilterParameter
|
|||
@JsonProperty("custom-5-like")
|
||||
private final String[] custom5Like;
|
||||
|
||||
/**
|
||||
* Filter by the value of the field custom6. This results in a substring search.. (% is appended
|
||||
* to the beginning and end of the requested value). Further SQL "LIKE" wildcard characters will
|
||||
* be resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-6-like",
|
||||
description =
|
||||
|
@ -204,11 +164,6 @@ public class ClassificationQueryFilterParameter
|
|||
+ "wildcard characters will be resolved correctly.")
|
||||
@JsonProperty("custom-6-like")
|
||||
private final String[] custom6Like;
|
||||
/**
|
||||
* Filter by the value of the field custom7. This results in a substring search.. (% is appended
|
||||
* to the beginning and end of the requested value). Further SQL "LIKE" wildcard characters will
|
||||
* be resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-7-like",
|
||||
description =
|
||||
|
@ -218,11 +173,6 @@ public class ClassificationQueryFilterParameter
|
|||
@JsonProperty("custom-7-like")
|
||||
private final String[] custom7Like;
|
||||
|
||||
/**
|
||||
* Filter by the value of the field custom8. This results in a substring search.. (% is appended
|
||||
* to the beginning and end of the requested value). Further SQL "LIKE" wildcard characters will
|
||||
* be resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-8-like",
|
||||
description =
|
||||
|
|
|
@ -14,7 +14,6 @@ public class ClassificationCollectionRepresentationModel
|
|||
super(content);
|
||||
}
|
||||
|
||||
/** the embedded classifications. */
|
||||
@Override
|
||||
@JsonProperty("classifications")
|
||||
public Collection<ClassificationRepresentationModel> getContent() {
|
||||
|
|
|
@ -5,34 +5,23 @@ import java.time.Instant;
|
|||
import pro.taskana.classification.api.models.Classification;
|
||||
|
||||
/** EntityModel class for {@link Classification}. */
|
||||
@Schema(description = "EntityModel class for Classification")
|
||||
public class ClassificationRepresentationModel extends ClassificationSummaryRepresentationModel {
|
||||
|
||||
/** True, if this classification to objects in this domain. */
|
||||
@Schema(
|
||||
name = "isValidInDomain",
|
||||
description = "True, if this classification to objects in this domain.")
|
||||
private Boolean isValidInDomain;
|
||||
/**
|
||||
* The creation timestamp of the classification in the system.
|
||||
*
|
||||
* <p>The format is ISO-8601.
|
||||
*/
|
||||
@Schema(
|
||||
name = "created",
|
||||
description =
|
||||
"The creation timestamp of the classification in the system.<p>The format is ISO-8601.")
|
||||
private Instant created;
|
||||
/**
|
||||
* The timestamp of the last modification.
|
||||
*
|
||||
* <p>The format is ISO-8601.
|
||||
*/
|
||||
@Schema(
|
||||
name = "modified",
|
||||
description = "The timestamp of the last modification.<p>The format is ISO-8601."
|
||||
)
|
||||
private Instant modified;
|
||||
/** The description of the classification. */
|
||||
@Schema(name = "description", description = "The description of the classification.")
|
||||
private String description;
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ public class ClassificationSummaryPagedRepresentationModel
|
|||
super(content, pageMetadata);
|
||||
}
|
||||
|
||||
/** the embedded classifications. */
|
||||
@Schema(name = "classifications", description = "the embedded classifications.")
|
||||
@Override
|
||||
@JsonProperty("classifications")
|
||||
|
|
|
@ -3,20 +3,14 @@ package pro.taskana.classification.rest.models;
|
|||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import org.springframework.hateoas.RepresentationModel;
|
||||
import pro.taskana.classification.api.models.ClassificationSummary;
|
||||
|
||||
/** EntityModel class for {@link ClassificationSummary}. */
|
||||
@Schema(description = "EntityModel class for ClassificationSummary")
|
||||
public class ClassificationSummaryRepresentationModel
|
||||
extends RepresentationModel<ClassificationSummaryRepresentationModel> {
|
||||
|
||||
/** Unique Id. */
|
||||
@Schema(name = "classificationId", description = "Unique Id.")
|
||||
@NotNull
|
||||
protected String classificationId;
|
||||
/**
|
||||
* The key of the Classification. This is typically an externally known code or abbreviation of
|
||||
* the Classification.
|
||||
*/
|
||||
@Schema(
|
||||
name = "key",
|
||||
description =
|
||||
|
@ -24,20 +18,12 @@ public class ClassificationSummaryRepresentationModel
|
|||
+ "abbreviation of the Classification.")
|
||||
@NotNull
|
||||
protected String key;
|
||||
/**
|
||||
* The logical name of the entry point. This is needed by the task list application to determine
|
||||
* the redirect to work on a task of this Classification.
|
||||
*/
|
||||
@Schema(
|
||||
name = "applicationEntryPoint",
|
||||
description =
|
||||
"The logical name of the entry point. This is needed by the task list application to "
|
||||
+ "determine the redirect to work on a task of this Classification.")
|
||||
protected String applicationEntryPoint;
|
||||
/**
|
||||
* The category of the classification. Categories can be configured in the file
|
||||
* 'taskana.properties'.
|
||||
*/
|
||||
@Schema(
|
||||
name = "category",
|
||||
description =
|
||||
|
@ -45,70 +31,51 @@ public class ClassificationSummaryRepresentationModel
|
|||
+ "'taskana.properties'.")
|
||||
@NotNull
|
||||
protected String category;
|
||||
/** The domain for which this classification is specified. */
|
||||
@Schema(name = "domain", description = "The domain for which this classification is specified.")
|
||||
protected String domain;
|
||||
/** The name of the classification. */
|
||||
@Schema(name = "name", description = "The name of the classification.")
|
||||
@NotNull
|
||||
protected String name;
|
||||
/** The Id of the parent classification. Empty string ("") if this is a root classification. */
|
||||
@Schema(
|
||||
name = "parentId",
|
||||
description =
|
||||
"The Id of the parent classification. Empty string (\"\") if this is a root "
|
||||
+ "classification.")
|
||||
protected String parentId;
|
||||
/** The key of the parent classification. Empty string ("") if this is a root classification. */
|
||||
@Schema(
|
||||
name = "parentKey",
|
||||
description =
|
||||
"The key of the parent classification. Empty string (\"\") if this is a root "
|
||||
+ "classification.")
|
||||
protected String parentKey;
|
||||
/** The priority of the classification. */
|
||||
@Schema(name = "priority", description = "The priority of the classification.")
|
||||
@NotNull
|
||||
protected int priority;
|
||||
/**
|
||||
* The service level of the classification.
|
||||
*
|
||||
* <p>This is stated according to ISO 8601.
|
||||
*/
|
||||
@Schema(
|
||||
name = "serviceLevel",
|
||||
description =
|
||||
"The service level of the classification.<p>This is stated according to ISO 8601.")
|
||||
@NotNull
|
||||
protected String serviceLevel;
|
||||
/** The type of classification. Types can be configured in the file 'taskana.properties'. */
|
||||
@Schema(
|
||||
name = "type",
|
||||
description =
|
||||
"The type of classification. Types can be configured in the file 'taskana.properties'.")
|
||||
protected String type;
|
||||
/** 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;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ public class QueryPagingParameter<T, Q extends BaseQuery<T, ?>>
|
|||
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'.")
|
||||
|
@ -28,7 +27,6 @@ public class QueryPagingParameter<T, Q extends BaseQuery<T, ?>>
|
|||
@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'.")
|
||||
|
|
|
@ -10,9 +10,6 @@ import pro.taskana.common.api.exceptions.InvalidArgumentException;
|
|||
public class QuerySortParameter<Q extends BaseQuery<?, ?>, S extends QuerySortBy<Q>>
|
||||
implements QueryParameter<Q, Void> {
|
||||
|
||||
// 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 =
|
||||
|
@ -21,11 +18,6 @@ public class QuerySortParameter<Q extends BaseQuery<?, ?>, S extends QuerySortBy
|
|||
@JsonProperty("sort-by")
|
||||
private final List<S> sortBy;
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "order",
|
||||
description =
|
||||
|
@ -77,12 +69,6 @@ public class QuerySortParameter<Q extends BaseQuery<?, ?>, S extends QuerySortBy
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @return the sort values
|
||||
*/
|
||||
@JsonProperty("sort-by")
|
||||
public List<S> getSortBy() {
|
||||
return sortBy;
|
||||
|
|
|
@ -48,11 +48,6 @@ public class TaskanaEngineController {
|
|||
this.configurationService = configurationService;
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint retrieves all configured Domains.
|
||||
*
|
||||
* @return An array with the domain-names as strings
|
||||
*/
|
||||
@Operation(
|
||||
summary = "This endpoint retrieves all configured Domains.",
|
||||
responses =
|
||||
|
@ -69,14 +64,6 @@ public class TaskanaEngineController {
|
|||
return ResponseEntity.ok(taskanaConfiguration.getDomains());
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint retrieves the configured classification categories for a specific classification
|
||||
* type.
|
||||
*
|
||||
* @param type the classification type whose categories should be determined. If not specified all
|
||||
* classification categories will be returned.
|
||||
* @return the classification categories for the requested type.
|
||||
*/
|
||||
@Operation(
|
||||
summary =
|
||||
"This endpoint retrieves the configured classification categories for a specific "
|
||||
|
@ -105,11 +92,6 @@ public class TaskanaEngineController {
|
|||
return ResponseEntity.ok(taskanaConfiguration.getAllClassificationCategories());
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint retrieves the configured classification types.
|
||||
*
|
||||
* @return the configured classification types.
|
||||
*/
|
||||
@Operation(
|
||||
summary = "This endpoint retrieves the configured classification types.",
|
||||
responses =
|
||||
|
@ -126,12 +108,6 @@ public class TaskanaEngineController {
|
|||
return ResponseEntity.ok(taskanaConfiguration.getClassificationTypes());
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint retrieves all configured classification categories grouped by each classification
|
||||
* type.
|
||||
*
|
||||
* @return the configured classification categories
|
||||
*/
|
||||
@Operation(
|
||||
summary =
|
||||
"This endpoint retrieves all configured classification categories grouped by each "
|
||||
|
@ -150,11 +126,6 @@ public class TaskanaEngineController {
|
|||
return ResponseEntity.ok(taskanaConfiguration.getClassificationCategoriesByType());
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint computes all information of the current user.
|
||||
*
|
||||
* @return the information of the current user.
|
||||
*/
|
||||
@Operation(
|
||||
summary = "This endpoint computes all information of the current user.",
|
||||
responses =
|
||||
|
@ -177,11 +148,6 @@ public class TaskanaEngineController {
|
|||
return ResponseEntity.ok(resource);
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint checks if the history module is in use.
|
||||
*
|
||||
* @return true, when the history is enabled, otherwise false
|
||||
*/
|
||||
@Operation(
|
||||
summary = "This endpoint checks if the history module is in use.",
|
||||
responses =
|
||||
|
@ -198,12 +164,6 @@ public class TaskanaEngineController {
|
|||
return ResponseEntity.ok(taskanaEngine.isHistoryEnabled());
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint retrieves the saved custom configuration.
|
||||
*
|
||||
* @title Get custom configuration
|
||||
* @return custom configuration
|
||||
*/
|
||||
@Operation(
|
||||
summary = "Get custom configuration",
|
||||
description = "This endpoint retrieves the saved custom configuration.",
|
||||
|
@ -223,13 +183,6 @@ public class TaskanaEngineController {
|
|||
return ResponseEntity.ok(new CustomAttributesRepresentationModel(allCustomAttributes));
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint overrides the custom configuration.
|
||||
*
|
||||
* @param customAttributes the new custom configuration
|
||||
* @title Set all custom configuration
|
||||
* @return the new custom configuration
|
||||
*/
|
||||
@Operation(
|
||||
summary = "Set all custom configuration",
|
||||
description = "This endpoint overrides the custom configuration.",
|
||||
|
@ -280,11 +233,6 @@ public class TaskanaEngineController {
|
|||
return ResponseEntity.ok(customAttributes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current application version.
|
||||
*
|
||||
* @return The current version.
|
||||
*/
|
||||
@Operation(
|
||||
summary = "Get the current application version",
|
||||
responses =
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package pro.taskana.common.rest.models;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.springframework.hateoas.RepresentationModel;
|
||||
import org.springframework.lang.NonNull;
|
||||
|
||||
|
@ -7,10 +8,16 @@ import org.springframework.lang.NonNull;
|
|||
public class AccessIdRepresentationModel extends RepresentationModel<AccessIdRepresentationModel> {
|
||||
|
||||
/** The name of this Access Id. */
|
||||
@Schema(name = "name", description = "The name of this Access Id.")
|
||||
private String name;
|
||||
/**
|
||||
* The value of the Access Id. This value will be used to determine the access to a workbasket.
|
||||
*/
|
||||
@Schema(
|
||||
name = "accessId",
|
||||
description =
|
||||
"The value of the Access Id. This value will be used to determine the access to a "
|
||||
+ "workbasket.")
|
||||
private String accessId;
|
||||
|
||||
public AccessIdRepresentationModel() {}
|
||||
|
|
|
@ -8,7 +8,6 @@ import org.springframework.hateoas.RepresentationModel;
|
|||
public class CustomAttributesRepresentationModel
|
||||
extends RepresentationModel<CustomAttributesRepresentationModel> {
|
||||
|
||||
/** The custom configuration attributes. */
|
||||
@Schema(
|
||||
name = "customAttributes",
|
||||
description = "The custom configuration attributes."
|
||||
|
|
|
@ -5,29 +5,25 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||
import java.beans.ConstructorProperties;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* This is copied from {@link org.springframework.hateoas.PagedModel.PageMetadata}. Reason: The
|
||||
* Spring Auto REST Docs Doclet only parses our code to check for JavaDoc comments. Since we want
|
||||
* this class to be documented we had to copy it.
|
||||
*/
|
||||
@Schema(
|
||||
description =
|
||||
"This is copied from org.springframework.hateoas.PagedModel.PageMetadata. Reason: The "
|
||||
+ "Spring OpenAPI only parses our code to check for OpenAPI notations. Since we want "
|
||||
+ "this class to be documented we had to copy it.")
|
||||
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;
|
||||
|
|
|
@ -8,7 +8,6 @@ import org.springframework.hateoas.RepresentationModel;
|
|||
public abstract class PagedRepresentationModel<T extends RepresentationModel<? super T>>
|
||||
extends CollectionRepresentationModel<T> {
|
||||
|
||||
/** the page meta data for a paged request. */
|
||||
@Schema(name = "page", description = "the page meta data for a paged request.")
|
||||
@JsonProperty("page")
|
||||
private final PageMetadata pageMetadata;
|
||||
|
|
|
@ -7,17 +7,15 @@ import org.springframework.hateoas.RepresentationModel;
|
|||
import org.springframework.lang.NonNull;
|
||||
import pro.taskana.common.api.TaskanaRole;
|
||||
|
||||
/** EntityModel class for user information. */
|
||||
@Schema(description = "EntityModel class for user information")
|
||||
public class TaskanaUserInfoRepresentationModel
|
||||
extends RepresentationModel<TaskanaUserInfoRepresentationModel> {
|
||||
|
||||
/** The user Id of the current user. */
|
||||
@Schema(
|
||||
name = "userId",
|
||||
description = "The user Id of the current user."
|
||||
)
|
||||
private String userId;
|
||||
/** All groups the current user is a member of. */
|
||||
@Schema(
|
||||
name = "groupIds",
|
||||
description = "All groups the current user is a member of."
|
||||
|
|
|
@ -5,10 +5,9 @@ import jakarta.validation.constraints.NotNull;
|
|||
import org.springframework.hateoas.RepresentationModel;
|
||||
import org.springframework.lang.NonNull;
|
||||
|
||||
/** EntityModel class for version information. */
|
||||
@Schema(description = "EntityModel class for version information.")
|
||||
public class VersionRepresentationModel extends RepresentationModel<VersionRepresentationModel> {
|
||||
|
||||
/** The current TASKANA version of the REST Service. */
|
||||
@Schema(name = "version", description = "The current TASKANA version of the REST Service.")
|
||||
@NotNull
|
||||
private String version;
|
||||
|
|
|
@ -226,7 +226,6 @@ public class ReportFilterParameter {
|
|||
return custom16NotIn;
|
||||
}
|
||||
|
||||
/** Determine weather the report should convert the age of the Tasks into working days. */
|
||||
@Schema(
|
||||
name = "in-working-days",
|
||||
description =
|
||||
|
@ -234,56 +233,44 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("in-working-days")
|
||||
protected final Boolean inWorkingDays;
|
||||
|
||||
/** 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")
|
||||
protected final String[] workbasketId;
|
||||
|
||||
/** 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")
|
||||
protected final TaskState[] state;
|
||||
|
||||
/** 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")
|
||||
protected final String[] classificationCategory;
|
||||
|
||||
/** 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")
|
||||
protected final String[] domain;
|
||||
|
||||
/** 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")
|
||||
protected final String[] classificationId;
|
||||
|
||||
/** Filter by the classification id of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "excluded-classification-id",
|
||||
description = "Filter by the classification id of the Task. This is an exact match.")
|
||||
@JsonProperty("excluded-classification-id")
|
||||
protected final String[] excludedClassificationId;
|
||||
|
||||
/** 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")
|
||||
protected final String[] custom1;
|
||||
|
||||
/**
|
||||
* Filter by the custom1 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-1-like",
|
||||
description =
|
||||
|
@ -293,7 +280,6 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-1-like")
|
||||
protected final String[] custom1Like;
|
||||
|
||||
/** Filter out by values of the field custom1 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-1-not-in",
|
||||
description =
|
||||
|
@ -301,18 +287,12 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-1-not-in")
|
||||
protected final String[] custom1NotIn;
|
||||
|
||||
/** Filter by the value of the field custom2 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-2",
|
||||
description = "Filter by the value of the field custom2 of the Task. This is an exact match.")
|
||||
@JsonProperty("custom-2")
|
||||
protected final String[] custom2;
|
||||
|
||||
/**
|
||||
* Filter by the custom2 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-2-like",
|
||||
description =
|
||||
|
@ -322,7 +302,6 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-2-like")
|
||||
protected final String[] custom2Like;
|
||||
|
||||
/** Filter out by values of the field custom2 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-2-not-in",
|
||||
description =
|
||||
|
@ -330,18 +309,12 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-2-not-in")
|
||||
protected final String[] custom2NotIn;
|
||||
|
||||
/** Filter by the value of the field custom3 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-3",
|
||||
description = "Filter by the value of the field custom3 of the Task. This is an exact match.")
|
||||
@JsonProperty("custom-3")
|
||||
protected final String[] custom3;
|
||||
|
||||
/**
|
||||
* Filter by the custom3 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-3-like",
|
||||
description =
|
||||
|
@ -351,7 +324,6 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-3-like")
|
||||
protected final String[] custom3Like;
|
||||
|
||||
/** Filter out by values of the field custom3 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-3-not-in",
|
||||
description =
|
||||
|
@ -359,18 +331,12 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-3-not-in")
|
||||
protected final String[] custom3NotIn;
|
||||
|
||||
/** Filter by the value of the field custom4 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-4",
|
||||
description = "Filter by the value of the field custom4 of the Task. This is an exact match.")
|
||||
@JsonProperty("custom-4")
|
||||
protected final String[] custom4;
|
||||
|
||||
/**
|
||||
* Filter by the custom4 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-4-like",
|
||||
description =
|
||||
|
@ -380,7 +346,6 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-4-like")
|
||||
protected final String[] custom4Like;
|
||||
|
||||
/** Filter out by values of the field custom4 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-4-not-in",
|
||||
description =
|
||||
|
@ -388,18 +353,12 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-4-not-in")
|
||||
protected final String[] custom4NotIn;
|
||||
|
||||
/** Filter by the value of the field custom5 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-5",
|
||||
description = "Filter by the value of the field custom5 of the Task. This is an exact match.")
|
||||
@JsonProperty("custom-5")
|
||||
protected final String[] custom5;
|
||||
|
||||
/**
|
||||
* Filter by the custom5 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-5-like",
|
||||
description =
|
||||
|
@ -409,7 +368,6 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-5-like")
|
||||
protected final String[] custom5Like;
|
||||
|
||||
/** Filter out by values of the field custom5 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-5-not-in",
|
||||
description =
|
||||
|
@ -417,18 +375,12 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-5-not-in")
|
||||
protected final String[] custom5NotIn;
|
||||
|
||||
/** Filter by the value of the field custom6 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-6",
|
||||
description = "Filter by the value of the field custom6 of the Task. This is an exact match.")
|
||||
@JsonProperty("custom-6")
|
||||
protected final String[] custom6;
|
||||
|
||||
/**
|
||||
* Filter by the custom6 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-6-like",
|
||||
description =
|
||||
|
@ -438,7 +390,6 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-6-like")
|
||||
protected final String[] custom6Like;
|
||||
|
||||
/** Filter out by values of the field custom6 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-6-not-in",
|
||||
description =
|
||||
|
@ -446,18 +397,12 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-6-not-in")
|
||||
protected final String[] custom6NotIn;
|
||||
|
||||
/** Filter by the value of the field custom7 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-7",
|
||||
description = "Filter by the value of the field custom7 of the Task. This is an exact match.")
|
||||
@JsonProperty("custom-7")
|
||||
protected final String[] custom7;
|
||||
|
||||
/**
|
||||
* Filter by the custom7 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-7-like",
|
||||
description =
|
||||
|
@ -467,7 +412,6 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-7-like")
|
||||
protected final String[] custom7Like;
|
||||
|
||||
/** Filter out by values of the field custom7 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-7-not-in",
|
||||
description =
|
||||
|
@ -475,18 +419,12 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-7-not-in")
|
||||
protected final String[] custom7NotIn;
|
||||
|
||||
/** Filter by the value of the field custom8 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-8",
|
||||
description = "Filter by the value of the field custom8 of the Task. This is an exact match.")
|
||||
@JsonProperty("custom-8")
|
||||
protected final String[] custom8;
|
||||
|
||||
/**
|
||||
* Filter by the custom8 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-8-like",
|
||||
description =
|
||||
|
@ -496,7 +434,6 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-8-like")
|
||||
protected final String[] custom8Like;
|
||||
|
||||
/** Filter out by values of the field custom8 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-8-not-in",
|
||||
description =
|
||||
|
@ -504,18 +441,12 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-8-not-in")
|
||||
protected final String[] custom8NotIn;
|
||||
|
||||
/** Filter by the value of the field custom9 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-9",
|
||||
description = "Filter by the value of the field custom9 of the Task. This is an exact match.")
|
||||
@JsonProperty("custom-9")
|
||||
protected final String[] custom9;
|
||||
|
||||
/**
|
||||
* Filter by the custom9 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-9-like",
|
||||
description =
|
||||
|
@ -525,7 +456,6 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-9-like")
|
||||
protected final String[] custom9Like;
|
||||
|
||||
/** Filter out by values of the field custom9 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-9-not-in",
|
||||
description =
|
||||
|
@ -533,7 +463,6 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-9-not-in")
|
||||
protected final String[] custom9NotIn;
|
||||
|
||||
/** Filter by the value of the field custom10 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-10",
|
||||
description =
|
||||
|
@ -541,11 +470,6 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-10")
|
||||
protected final String[] custom10;
|
||||
|
||||
/**
|
||||
* Filter by the custom10 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-10-like",
|
||||
description =
|
||||
|
@ -555,7 +479,6 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-10-like")
|
||||
protected final String[] custom10Like;
|
||||
|
||||
/** Filter out by values of the field custom10 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-10-not-in",
|
||||
description =
|
||||
|
@ -563,7 +486,6 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-10-not-in")
|
||||
protected final String[] custom10NotIn;
|
||||
|
||||
/** Filter by the value of the field custom11 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-11",
|
||||
description =
|
||||
|
@ -571,11 +493,6 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-11")
|
||||
protected final String[] custom11;
|
||||
|
||||
/**
|
||||
* Filter by the custom11 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-11-like",
|
||||
description =
|
||||
|
@ -585,7 +502,6 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-11-like")
|
||||
protected final String[] custom11Like;
|
||||
|
||||
/** Filter out by values of the field custom11 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-11-not-in",
|
||||
description =
|
||||
|
@ -593,7 +509,6 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-11-not-in")
|
||||
protected final String[] custom11NotIn;
|
||||
|
||||
/** Filter by the value of the field custom12 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-12",
|
||||
description =
|
||||
|
@ -601,11 +516,6 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-12")
|
||||
protected final String[] custom12;
|
||||
|
||||
/**
|
||||
* Filter by the custom12 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-12-like",
|
||||
description =
|
||||
|
@ -615,7 +525,6 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-12-like")
|
||||
protected final String[] custom12Like;
|
||||
|
||||
/** Filter out by values of the field custom12 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-12-not-in",
|
||||
description =
|
||||
|
@ -623,7 +532,6 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-12-not-in")
|
||||
protected final String[] custom12NotIn;
|
||||
|
||||
/** Filter by the value of the field custom13 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-13",
|
||||
description =
|
||||
|
@ -631,11 +539,6 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-13")
|
||||
protected final String[] custom13;
|
||||
|
||||
/**
|
||||
* Filter by the custom13 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-13-like",
|
||||
description =
|
||||
|
@ -645,7 +548,6 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-13-like")
|
||||
protected final String[] custom13Like;
|
||||
|
||||
/** Filter out by values of the field custom13 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-13-not-in",
|
||||
description =
|
||||
|
@ -653,7 +555,6 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-13-not-in")
|
||||
protected final String[] custom13NotIn;
|
||||
|
||||
/** Filter by the value of the field custom14 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-14",
|
||||
description =
|
||||
|
@ -661,11 +562,6 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-14")
|
||||
protected final String[] custom14;
|
||||
|
||||
/**
|
||||
* Filter by the custom14 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-14-like",
|
||||
description =
|
||||
|
@ -675,7 +571,6 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-14-like")
|
||||
protected final String[] custom14Like;
|
||||
|
||||
/** Filter out by values of the field custom14 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-14-not-in",
|
||||
description =
|
||||
|
@ -683,7 +578,6 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-14-not-in")
|
||||
protected final String[] custom14NotIn;
|
||||
|
||||
/** Filter by the value of the field custom15 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-15",
|
||||
description =
|
||||
|
@ -691,11 +585,6 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-15")
|
||||
protected final String[] custom15;
|
||||
|
||||
/**
|
||||
* Filter by the custom15 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-15-like",
|
||||
description =
|
||||
|
@ -705,7 +594,6 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-15-like")
|
||||
protected final String[] custom15Like;
|
||||
|
||||
/** Filter out by values of the field custom15 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-15-not-in",
|
||||
description =
|
||||
|
@ -713,7 +601,6 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-15-not-in")
|
||||
protected final String[] custom15NotIn;
|
||||
|
||||
/** Filter by the value of the field custom16 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-16",
|
||||
description =
|
||||
|
@ -721,11 +608,6 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-16")
|
||||
protected final String[] custom16;
|
||||
|
||||
/**
|
||||
* Filter by the custom16 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-16-like",
|
||||
description =
|
||||
|
@ -735,7 +617,6 @@ public class ReportFilterParameter {
|
|||
@JsonProperty("custom-16-like")
|
||||
protected final String[] custom16Like;
|
||||
|
||||
/** Filter out by values of the field custom16 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-16-not-in",
|
||||
description =
|
||||
|
|
|
@ -9,13 +9,11 @@ import org.springframework.hateoas.RepresentationModel;
|
|||
public class PriorityColumnHeaderRepresentationModel
|
||||
extends RepresentationModel<PriorityColumnHeaderRepresentationModel> {
|
||||
|
||||
/** Determine the lower priority for this column header. This value is inclusive. */
|
||||
@Schema(
|
||||
name = "lowerBound",
|
||||
description = "Determine the lower priority for this column header. This value is inclusive.")
|
||||
private final int lowerBound;
|
||||
|
||||
/** Determine the upper priority for this column header. This value is inclusive. */
|
||||
@Schema(
|
||||
name = "upperBound",
|
||||
description = "Determine the upper priority for this column header. This value is inclusive.")
|
||||
|
|
|
@ -6,19 +6,15 @@ import java.time.Instant;
|
|||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import org.springframework.hateoas.RepresentationModel;
|
||||
import pro.taskana.monitor.api.reports.Report;
|
||||
import pro.taskana.monitor.api.reports.row.SingleRow;
|
||||
|
||||
/** EntityModel class for {@link Report}. */
|
||||
@Schema(description = "EntityModel class for Report.")
|
||||
public class ReportRepresentationModel extends RepresentationModel<ReportRepresentationModel> {
|
||||
|
||||
/** Object holding meta info on the report. */
|
||||
@Schema(name = "meta", description = "Object holding meta info on the report.")
|
||||
private final MetaInformation meta;
|
||||
/** Array holding the rows of the report. */
|
||||
@Schema(name = "rows", description = "Array holding the rows of the report.")
|
||||
private final List<RowRepresentationModel> rows;
|
||||
/** Array holding the sums in the columns over all rows. */
|
||||
@Schema(name = "sumRow", description = "Array holding the sums in the columns over all rows.")
|
||||
private final List<RowRepresentationModel> sumRow;
|
||||
|
||||
|
@ -45,24 +41,20 @@ public class ReportRepresentationModel extends RepresentationModel<ReportReprese
|
|||
}
|
||||
|
||||
/** EntityModel class for {@link SingleRow}. */
|
||||
@Schema(description = "EntityModel class for SingleRow.")
|
||||
public static class RowRepresentationModel {
|
||||
|
||||
/** Array holding all the cell values of the given row. */
|
||||
@Schema(name = "cells", description = "Array holding all the cell values of the given row.")
|
||||
private final int[] cells;
|
||||
/** Sum of all values of the given row. */
|
||||
@Schema(name = "cells", description = "Sum of all values of the given row.")
|
||||
private final int total;
|
||||
/** Depth of the row. If the depth is > 0, then this row is a sub-row of a prior row */
|
||||
@Schema(
|
||||
name = "depth",
|
||||
description =
|
||||
"Depth of the row. If the depth is > 0, then this row is a sub-row of a prior row")
|
||||
private final int depth;
|
||||
/** Array containing description of the row. */
|
||||
@Schema(name = "desc", description = "Array containing description of the row.")
|
||||
private final String[] desc;
|
||||
/** Boolean identifying if the given row should be initially displayed or not. */
|
||||
@Schema(
|
||||
name = "display",
|
||||
description = "Boolean identifying if the given row should be initially displayed or not.")
|
||||
|
@ -114,22 +106,17 @@ public class ReportRepresentationModel extends RepresentationModel<ReportReprese
|
|||
}
|
||||
}
|
||||
|
||||
/** Meta Information about this ReportResource. */
|
||||
@Schema(description = "Meta Information about this ReportResource.")
|
||||
public static class MetaInformation {
|
||||
|
||||
/** Name of the report. */
|
||||
@Schema(name = "name", description = "Name of the report.")
|
||||
private final String name;
|
||||
/** Date of the report creation. */
|
||||
@Schema(name = "date", description = "Date of the report creation.")
|
||||
private final Instant date;
|
||||
/** Column headers of the report. */
|
||||
@Schema(name = "header", description = "Column headers of the report.")
|
||||
private final String[] header;
|
||||
/** Descriptions for the rows of the report. */
|
||||
@Schema(name = "rowDesc", description = "Descriptions for the rows of the report.")
|
||||
private final String[] rowDesc;
|
||||
/** Description for the sum column. */
|
||||
@Schema(name = "sumRowDesc", description = "Description for the sum column.")
|
||||
private final String sumRowDesc;
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ import jakarta.servlet.http.HttpServletRequest;
|
|||
import java.beans.ConstructorProperties;
|
||||
import java.util.List;
|
||||
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;
|
||||
|
@ -145,9 +146,9 @@ public class TaskCommentController {
|
|||
public ResponseEntity<TaskCommentCollectionRepresentationModel> getTaskComments(
|
||||
@PathVariable("taskId") String taskId,
|
||||
HttpServletRequest request,
|
||||
TaskCommentQueryFilterParameter filterParameter,
|
||||
TaskCommentQuerySortParameter sortParameter,
|
||||
QueryPagingParameter<TaskComment, TaskCommentQuery> pagingParameter) {
|
||||
@ParameterObject TaskCommentQueryFilterParameter filterParameter,
|
||||
@ParameterObject TaskCommentQuerySortParameter sortParameter,
|
||||
@ParameterObject QueryPagingParameter<TaskComment, TaskCommentQuery> pagingParameter) {
|
||||
|
||||
QueryParamsValidator.validateParams(
|
||||
request,
|
||||
|
|
|
@ -10,12 +10,10 @@ import pro.taskana.task.api.TaskCommentQuery;
|
|||
|
||||
public class TaskCommentQueryFilterParameter implements QueryParameter<TaskCommentQuery, Void> {
|
||||
|
||||
/** Filter by the id of the TaskComment. This is an exact match. */
|
||||
@Schema(name = "id", description = "Filter by the id of the TaskComment. This is an exact match.")
|
||||
@JsonProperty("id")
|
||||
private final String[] idIn;
|
||||
|
||||
/** Filter by what the id of the TaskComment shouldn't be. This is an exact match. */
|
||||
@Schema(
|
||||
name = "id-not",
|
||||
description =
|
||||
|
@ -23,11 +21,6 @@ public class TaskCommentQueryFilterParameter implements QueryParameter<TaskComme
|
|||
@JsonProperty("id-not")
|
||||
private final String[] idNotIn;
|
||||
|
||||
/**
|
||||
* Filter by the id of the TaskComment. 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 = "id-like",
|
||||
description =
|
||||
|
@ -37,11 +30,6 @@ public class TaskCommentQueryFilterParameter implements QueryParameter<TaskComme
|
|||
@JsonProperty("id-like")
|
||||
private final String[] idLike;
|
||||
|
||||
/**
|
||||
* Filter by what the id of the TaskComment 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "id-not-like",
|
||||
description =
|
||||
|
@ -51,21 +39,18 @@ public class TaskCommentQueryFilterParameter implements QueryParameter<TaskComme
|
|||
@JsonProperty("id-not-like")
|
||||
private final String[] idNotLike;
|
||||
|
||||
/** Filter by the task id of the TaskComment. This is an exact match. */
|
||||
@Schema(
|
||||
name = "task-id",
|
||||
description = "Filter by the task id of the TaskComment. This is an exact match.")
|
||||
@JsonProperty("task-id")
|
||||
private final String[] taskIdIn;
|
||||
|
||||
/** Filter by the creator of the TaskComment. This is an exact match. */
|
||||
@Schema(
|
||||
name = "creator",
|
||||
description = "Filter by the creator of the TaskComment. This is an exact match.")
|
||||
@JsonProperty("creator")
|
||||
private final String[] creatorIn;
|
||||
|
||||
/** Filter by what the creator of the TaskComment shouldn't be. This is an exact match. */
|
||||
@Schema(
|
||||
name = "creator-not",
|
||||
description =
|
||||
|
@ -73,11 +58,6 @@ public class TaskCommentQueryFilterParameter implements QueryParameter<TaskComme
|
|||
@JsonProperty("creator-not")
|
||||
private final String[] creatorNotIn;
|
||||
|
||||
/**
|
||||
* Filter by the creator of the TaskComment. 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 = "creator-like",
|
||||
description =
|
||||
|
@ -87,11 +67,6 @@ public class TaskCommentQueryFilterParameter implements QueryParameter<TaskComme
|
|||
@JsonProperty("creator-like")
|
||||
private final String[] creatorLike;
|
||||
|
||||
/**
|
||||
* Filter by what the creator of the TaskComment 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "creator-not-like",
|
||||
description =
|
||||
|
@ -101,11 +76,6 @@ public class TaskCommentQueryFilterParameter implements QueryParameter<TaskComme
|
|||
@JsonProperty("creator-not-like")
|
||||
private final String[] creatorNotLike;
|
||||
|
||||
/**
|
||||
* Filter by the textfield of the TaskComment. 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 = "textfield-like",
|
||||
description =
|
||||
|
@ -115,11 +85,6 @@ public class TaskCommentQueryFilterParameter implements QueryParameter<TaskComme
|
|||
@JsonProperty("textfield-like")
|
||||
private final String[] textfieldLike;
|
||||
|
||||
/**
|
||||
* Filter by what the textfield of the TaskComment 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "textfield-not-like",
|
||||
description =
|
||||
|
@ -129,12 +94,6 @@ public class TaskCommentQueryFilterParameter implements QueryParameter<TaskComme
|
|||
@JsonProperty("textfield-not-like")
|
||||
private final String[] textfieldNotLike;
|
||||
|
||||
/**
|
||||
* Filter by a time interval within which the TaskComment was modified. To create an open interval
|
||||
* you can just leave it blank.
|
||||
*
|
||||
* <p>The format is ISO-8601.
|
||||
*/
|
||||
@Schema(
|
||||
name = "modified",
|
||||
description =
|
||||
|
@ -143,12 +102,6 @@ public class TaskCommentQueryFilterParameter implements QueryParameter<TaskComme
|
|||
@JsonProperty("modified")
|
||||
private final Instant[] modifiedWithin;
|
||||
|
||||
/**
|
||||
* Filter by a time interval within which the TaskComment wasn't modified. To create an open
|
||||
* interval you can just leave it blank.
|
||||
*
|
||||
* <p>The format is ISO-8601.
|
||||
*/
|
||||
@Schema(
|
||||
name = "modified-not",
|
||||
description =
|
||||
|
@ -157,12 +110,6 @@ public class TaskCommentQueryFilterParameter implements QueryParameter<TaskComme
|
|||
@JsonProperty("modified-not")
|
||||
private final Instant[] modifiedNotWithin;
|
||||
|
||||
/**
|
||||
* Filter by a time interval within which the TaskComment was created. To create an open interval
|
||||
* you can just leave it blank.
|
||||
*
|
||||
* <p>The format is ISO-8601.
|
||||
*/
|
||||
@Schema(
|
||||
name = "created",
|
||||
description =
|
||||
|
@ -171,12 +118,6 @@ public class TaskCommentQueryFilterParameter implements QueryParameter<TaskComme
|
|||
@JsonProperty("created")
|
||||
private final Instant[] createdWithin;
|
||||
|
||||
/**
|
||||
* Filter by a time interval within which the TaskComment wasn't created. To create an open
|
||||
* interval you can just leave it blank.
|
||||
*
|
||||
* <p>The format is ISO-8601.
|
||||
*/
|
||||
@Schema(
|
||||
name = "created-not",
|
||||
description =
|
||||
|
|
|
@ -1164,7 +1164,7 @@ public class TaskController {
|
|||
"if true, the Task property isRead is set to true, else it's set to false",
|
||||
content =
|
||||
@Content(
|
||||
schema = @Schema(implementation = TaskRepresentationModel.class),
|
||||
schema = @Schema(implementation = IsReadRepresentationModel.class),
|
||||
examples = @ExampleObject(value = "{\"is-read\": true}"))),
|
||||
responses = {
|
||||
@ApiResponse(
|
||||
|
|
|
@ -285,23 +285,16 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
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;
|
||||
|
||||
/**
|
||||
* Filter by the custom1 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-1-like",
|
||||
description =
|
||||
|
@ -311,11 +304,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-1-like")
|
||||
private final String[] custom1Like;
|
||||
|
||||
/**
|
||||
* Filter by what the custom1 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-1-not-like",
|
||||
description =
|
||||
|
@ -325,14 +313,12 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-1-not-like")
|
||||
private final String[] custom1NotLike;
|
||||
|
||||
/** Filter by the value of the field custom2 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-2",
|
||||
description = "Filter by the value of the field custom2 of the Task. This is an exact match.")
|
||||
@JsonProperty("custom-2")
|
||||
private final String[] custom2In;
|
||||
|
||||
/** Filter out by values of the field custom2 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-2-not",
|
||||
description =
|
||||
|
@ -340,11 +326,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-2-not")
|
||||
private final String[] custom2NotIn;
|
||||
|
||||
/**
|
||||
* Filter by the custom2 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-2-like",
|
||||
description =
|
||||
|
@ -354,11 +335,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-2-like")
|
||||
private final String[] custom2Like;
|
||||
|
||||
/**
|
||||
* Filter by what the custom2 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-2-not-like",
|
||||
description =
|
||||
|
@ -368,14 +344,12 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-2-not-like")
|
||||
private final String[] custom2NotLike;
|
||||
|
||||
/** Filter by the value of the field custom3 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-3",
|
||||
description = "Filter by the value of the field custom3 of the Task. This is an exact match.")
|
||||
@JsonProperty("custom-3")
|
||||
private final String[] custom3In;
|
||||
|
||||
/** Filter out by values of the field custom3 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-3-not",
|
||||
description =
|
||||
|
@ -383,11 +357,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-3-not")
|
||||
private final String[] custom3NotIn;
|
||||
|
||||
/**
|
||||
* Filter by the custom3 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-3-like",
|
||||
description =
|
||||
|
@ -397,11 +366,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-3-like")
|
||||
private final String[] custom3Like;
|
||||
|
||||
/**
|
||||
* Filter by what the custom3 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-3-not-like",
|
||||
description =
|
||||
|
@ -411,14 +375,12 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-3-not-like")
|
||||
private final String[] custom3NotLike;
|
||||
|
||||
/** Filter by the value of the field custom4 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-4",
|
||||
description = "Filter by the value of the field custom4 of the Task. This is an exact match.")
|
||||
@JsonProperty("custom-4")
|
||||
private final String[] custom4In;
|
||||
|
||||
/** Filter out by values of the field custom4 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-4-not",
|
||||
description =
|
||||
|
@ -426,11 +388,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-4-not")
|
||||
private final String[] custom4NotIn;
|
||||
|
||||
/**
|
||||
* Filter by the custom4 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-4-like",
|
||||
description =
|
||||
|
@ -440,11 +397,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-4-like")
|
||||
private final String[] custom4Like;
|
||||
|
||||
/**
|
||||
* Filter by what the custom4 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-4-not-like",
|
||||
description =
|
||||
|
@ -454,14 +406,12 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-4-not-like")
|
||||
private final String[] custom4NotLike;
|
||||
|
||||
/** Filter by the value of the field custom5 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-5",
|
||||
description = "Filter by the value of the field custom5 of the Task. This is an exact match.")
|
||||
@JsonProperty("custom-5")
|
||||
private final String[] custom5In;
|
||||
|
||||
/** Filter out by values of the field custom5 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-5-not",
|
||||
description =
|
||||
|
@ -469,11 +419,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-5-not")
|
||||
private final String[] custom5NotIn;
|
||||
|
||||
/**
|
||||
* Filter by the custom5 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-5-like",
|
||||
description =
|
||||
|
@ -483,11 +428,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-5-like")
|
||||
private final String[] custom5Like;
|
||||
|
||||
/**
|
||||
* Filter by what the custom5 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-5-not-like",
|
||||
description =
|
||||
|
@ -497,14 +437,12 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-5-not-like")
|
||||
private final String[] custom5NotLike;
|
||||
|
||||
/** Filter by the value of the field custom6 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-6",
|
||||
description = "Filter by the value of the field custom6 of the Task. This is an exact match.")
|
||||
@JsonProperty("custom-6")
|
||||
private final String[] custom6In;
|
||||
|
||||
/** Filter out by values of the field custom6 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-6-not",
|
||||
description =
|
||||
|
@ -512,11 +450,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-6-not")
|
||||
private final String[] custom6NotIn;
|
||||
|
||||
/**
|
||||
* Filter by the custom6 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-6-like",
|
||||
description =
|
||||
|
@ -526,11 +459,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-6-like")
|
||||
private final String[] custom6Like;
|
||||
|
||||
/**
|
||||
* Filter by what the custom6 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-6-not-like",
|
||||
description =
|
||||
|
@ -540,14 +468,12 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-6-not-like")
|
||||
private final String[] custom6NotLike;
|
||||
|
||||
/** Filter by the value of the field custom7 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-7",
|
||||
description = "Filter by the value of the field custom7 of the Task. This is an exact match.")
|
||||
@JsonProperty("custom-7")
|
||||
private final String[] custom7In;
|
||||
|
||||
/** Filter out by values of the field custom7 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-7-not",
|
||||
description =
|
||||
|
@ -555,11 +481,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-7-not")
|
||||
private final String[] custom7NotIn;
|
||||
|
||||
/**
|
||||
* Filter by the custom7 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-7-like",
|
||||
description =
|
||||
|
@ -569,11 +490,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-7-like")
|
||||
private final String[] custom7Like;
|
||||
|
||||
/**
|
||||
* Filter by what the custom7 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-7-not-like",
|
||||
description =
|
||||
|
@ -583,14 +499,12 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-7-not-like")
|
||||
private final String[] custom7NotLike;
|
||||
|
||||
/** Filter by the value of the field custom8 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-8",
|
||||
description = "Filter by the value of the field custom8 of the Task. This is an exact match.")
|
||||
@JsonProperty("custom-8")
|
||||
private final String[] custom8In;
|
||||
|
||||
/** Filter out by values of the field custom8 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-8-not",
|
||||
description =
|
||||
|
@ -598,11 +512,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-8-not")
|
||||
private final String[] custom8NotIn;
|
||||
|
||||
/**
|
||||
* Filter by the custom8 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-8-like",
|
||||
description =
|
||||
|
@ -612,11 +521,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-8-like")
|
||||
private final String[] custom8Like;
|
||||
|
||||
/**
|
||||
* Filter by what the custom8 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-8-not-like",
|
||||
description =
|
||||
|
@ -626,14 +530,12 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-8-not-like")
|
||||
private final String[] custom8NotLike;
|
||||
|
||||
/** Filter by the value of the field custom9 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-9",
|
||||
description = "Filter by the value of the field custom9 of the Task. This is an exact match.")
|
||||
@JsonProperty("custom-9")
|
||||
private final String[] custom9In;
|
||||
|
||||
/** Filter out by values of the field custom9 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-9-not",
|
||||
description =
|
||||
|
@ -641,11 +543,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-9-not")
|
||||
private final String[] custom9NotIn;
|
||||
|
||||
/**
|
||||
* Filter by the custom9 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-9-like",
|
||||
description =
|
||||
|
@ -655,11 +552,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-9-like")
|
||||
private final String[] custom9Like;
|
||||
|
||||
/**
|
||||
* Filter by what the custom9 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-9-not-like",
|
||||
description =
|
||||
|
@ -669,7 +561,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-9-not-like")
|
||||
private final String[] custom9NotLike;
|
||||
|
||||
/** Filter by the value of the field custom10 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-10",
|
||||
description =
|
||||
|
@ -677,7 +568,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-10")
|
||||
private final String[] custom10In;
|
||||
|
||||
/** Filter out by values of the field custom10 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-10-not",
|
||||
description =
|
||||
|
@ -685,11 +575,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-10-not")
|
||||
private final String[] custom10NotIn;
|
||||
|
||||
/**
|
||||
* Filter by the custom10 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-10-like",
|
||||
description =
|
||||
|
@ -699,11 +584,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-10-like")
|
||||
private final String[] custom10Like;
|
||||
|
||||
/**
|
||||
* Filter by what the custom10 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-10-not-like",
|
||||
description =
|
||||
|
@ -713,7 +593,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-10-not-like")
|
||||
private final String[] custom10NotLike;
|
||||
|
||||
/** Filter by the value of the field custom11 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-11",
|
||||
description =
|
||||
|
@ -721,7 +600,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-11")
|
||||
private final String[] custom11In;
|
||||
|
||||
/** Filter out by values of the field custom11 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-11-not",
|
||||
description =
|
||||
|
@ -729,11 +607,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-11-not")
|
||||
private final String[] custom11NotIn;
|
||||
|
||||
/**
|
||||
* Filter by the custom11 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-11-like",
|
||||
description =
|
||||
|
@ -743,11 +616,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-11-like")
|
||||
private final String[] custom11Like;
|
||||
|
||||
/**
|
||||
* Filter by what the custom11 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-11-not-like",
|
||||
description =
|
||||
|
@ -757,7 +625,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-11-not-like")
|
||||
private final String[] custom11NotLike;
|
||||
|
||||
/** Filter by the value of the field custom12 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-12",
|
||||
description =
|
||||
|
@ -765,7 +632,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-12")
|
||||
private final String[] custom12In;
|
||||
|
||||
/** Filter out by values of the field custom12 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-12-not",
|
||||
description =
|
||||
|
@ -773,11 +639,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-12-not")
|
||||
private final String[] custom12NotIn;
|
||||
|
||||
/**
|
||||
* Filter by the custom12 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-12-like",
|
||||
description =
|
||||
|
@ -787,11 +648,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-12-like")
|
||||
private final String[] custom12Like;
|
||||
|
||||
/**
|
||||
* Filter by what the custom12 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-12-not-like",
|
||||
description =
|
||||
|
@ -801,7 +657,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-12-not-like")
|
||||
private final String[] custom12NotLike;
|
||||
|
||||
/** Filter by the value of the field custom13 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-13",
|
||||
description =
|
||||
|
@ -809,7 +664,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-13")
|
||||
private final String[] custom13In;
|
||||
|
||||
/** Filter out by values of the field custom13 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-13-not",
|
||||
description =
|
||||
|
@ -817,11 +671,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-13-not")
|
||||
private final String[] custom13NotIn;
|
||||
|
||||
/**
|
||||
* Filter by the custom13 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-13-like",
|
||||
description =
|
||||
|
@ -831,11 +680,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-13-like")
|
||||
private final String[] custom13Like;
|
||||
|
||||
/**
|
||||
* Filter by what the custom13 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-13-not-like",
|
||||
description =
|
||||
|
@ -845,7 +689,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-13-not-like")
|
||||
private final String[] custom13NotLike;
|
||||
|
||||
/** Filter by the value of the field custom14 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-14",
|
||||
description =
|
||||
|
@ -853,7 +696,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-14")
|
||||
private final String[] custom14In;
|
||||
|
||||
/** Filter out by values of the field custom14 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-14-not",
|
||||
description =
|
||||
|
@ -861,11 +703,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-14-not")
|
||||
private final String[] custom14NotIn;
|
||||
|
||||
/**
|
||||
* Filter by the custom14 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-14-like",
|
||||
description =
|
||||
|
@ -875,11 +712,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-14-like")
|
||||
private final String[] custom14Like;
|
||||
|
||||
/**
|
||||
* Filter by what the custom14 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-14-not-like",
|
||||
description =
|
||||
|
@ -889,7 +721,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-14-not-like")
|
||||
private final String[] custom14NotLike;
|
||||
|
||||
/** Filter by the value of the field custom15 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-15",
|
||||
description =
|
||||
|
@ -897,7 +728,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-15")
|
||||
private final String[] custom15In;
|
||||
|
||||
/** Filter out by values of the field custom15 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-15-not",
|
||||
description =
|
||||
|
@ -905,11 +735,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-15-not")
|
||||
private final String[] custom15NotIn;
|
||||
|
||||
/**
|
||||
* Filter by the custom15 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-15-like",
|
||||
description =
|
||||
|
@ -919,11 +744,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-15-like")
|
||||
private final String[] custom15Like;
|
||||
|
||||
/**
|
||||
* Filter by what the custom15 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-15-not-like",
|
||||
description =
|
||||
|
@ -933,7 +753,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-15-not-like")
|
||||
private final String[] custom15NotLike;
|
||||
|
||||
/** Filter by the value of the field custom16 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-16",
|
||||
description =
|
||||
|
@ -941,7 +760,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-16")
|
||||
private final String[] custom16In;
|
||||
|
||||
/** Filter out by values of the field custom16 of the Task. This is an exact match. */
|
||||
@Schema(
|
||||
name = "custom-16-not",
|
||||
description =
|
||||
|
@ -949,11 +767,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-16-not")
|
||||
private final String[] custom16NotIn;
|
||||
|
||||
/**
|
||||
* Filter by the custom16 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-16-like",
|
||||
description =
|
||||
|
@ -963,11 +776,6 @@ public class TaskQueryFilterCustomFields implements QueryParameter<TaskQuery, Vo
|
|||
@JsonProperty("custom-16-like")
|
||||
private final String[] custom16Like;
|
||||
|
||||
/**
|
||||
* Filter by what the custom16 field 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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-16-not-like",
|
||||
description =
|
||||
|
|
|
@ -274,37 +274,28 @@ public class TaskQueryFilterCustomIntFields implements QueryParameter<TaskQuery,
|
|||
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;
|
||||
|
||||
/**
|
||||
* Filter by lower bound of customInt1.
|
||||
*
|
||||
* <p>This parameter can't be used together with 'custom-int-1-within'.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-int-1-from",
|
||||
description =
|
||||
|
@ -312,17 +303,11 @@ public class TaskQueryFilterCustomIntFields implements QueryParameter<TaskQuery,
|
|||
+ "'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;
|
||||
/**
|
||||
* Filter by upper bound of customInt1.
|
||||
*
|
||||
* <p>This parameter can't be used together with 'custom-int-1-within'.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-int-1-to",
|
||||
description =
|
||||
|
@ -330,15 +315,12 @@ public class TaskQueryFilterCustomIntFields implements QueryParameter<TaskQuery,
|
|||
+ "'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 =
|
||||
|
@ -346,29 +328,21 @@ public class TaskQueryFilterCustomIntFields implements QueryParameter<TaskQuery,
|
|||
@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;
|
||||
/**
|
||||
* Filter by lower bound of customInt2.
|
||||
*
|
||||
* <p>This parameter can't be used together with 'custom-int-2-within'.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-int-2-from",
|
||||
description =
|
||||
|
@ -376,17 +350,11 @@ public class TaskQueryFilterCustomIntFields implements QueryParameter<TaskQuery,
|
|||
+ "'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;
|
||||
/**
|
||||
* Filter by upper bound of customInt2.
|
||||
*
|
||||
* <p>This parameter can't be used together with 'custom-int-2-within'.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-int-2-to",
|
||||
description =
|
||||
|
@ -394,13 +362,11 @@ public class TaskQueryFilterCustomIntFields implements QueryParameter<TaskQuery,
|
|||
+ "'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 =
|
||||
|
@ -408,29 +374,21 @@ public class TaskQueryFilterCustomIntFields implements QueryParameter<TaskQuery,
|
|||
@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;
|
||||
/**
|
||||
* Filter by lower bound of customInt3.
|
||||
*
|
||||
* <p>This parameter can't be used together with 'custom-int-3-within'.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-int-3-from",
|
||||
description =
|
||||
|
@ -438,17 +396,11 @@ public class TaskQueryFilterCustomIntFields implements QueryParameter<TaskQuery,
|
|||
+ "'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;
|
||||
/**
|
||||
* Filter by upper bound of customInt3.
|
||||
*
|
||||
* <p>This parameter can't be used together with 'custom-int-3-within'.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-int-3-to",
|
||||
description =
|
||||
|
@ -456,43 +408,32 @@ public class TaskQueryFilterCustomIntFields implements QueryParameter<TaskQuery,
|
|||
+ "'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;
|
||||
/**
|
||||
* Filter by lower bound of customInt4.
|
||||
*
|
||||
* <p>This parameter can't be used together with 'custom-int-4-within'.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-int-4-from",
|
||||
description =
|
||||
|
@ -500,17 +441,11 @@ public class TaskQueryFilterCustomIntFields implements QueryParameter<TaskQuery,
|
|||
+ "'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;
|
||||
/**
|
||||
* Filter by upper bound of customInt4.
|
||||
*
|
||||
* <p>This parameter can't be used together with 'custom-int-4-within'.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-int-4-to",
|
||||
description =
|
||||
|
@ -518,13 +453,11 @@ public class TaskQueryFilterCustomIntFields implements QueryParameter<TaskQuery,
|
|||
+ "'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 =
|
||||
|
@ -532,29 +465,21 @@ public class TaskQueryFilterCustomIntFields implements QueryParameter<TaskQuery,
|
|||
@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;
|
||||
/**
|
||||
* Filter by lower bound of customInt5.
|
||||
*
|
||||
* <p>This parameter can't be used together with 'custom-int-5-within'.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-int-5-from",
|
||||
description =
|
||||
|
@ -562,17 +487,11 @@ public class TaskQueryFilterCustomIntFields implements QueryParameter<TaskQuery,
|
|||
+ "'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;
|
||||
/**
|
||||
* Filter by upper bound of customInt5.
|
||||
*
|
||||
* <p>This parameter can't be used together with 'custom-int-5-within'.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-int-5-to",
|
||||
description =
|
||||
|
@ -580,13 +499,11 @@ public class TaskQueryFilterCustomIntFields implements QueryParameter<TaskQuery,
|
|||
+ "'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 =
|
||||
|
@ -594,29 +511,21 @@ public class TaskQueryFilterCustomIntFields implements QueryParameter<TaskQuery,
|
|||
@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;
|
||||
/**
|
||||
* Filter by lower bound of customInt6.
|
||||
*
|
||||
* <p>This parameter can't be used together with 'custom-int-6-within'.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-int-6-from",
|
||||
description =
|
||||
|
@ -624,17 +533,11 @@ public class TaskQueryFilterCustomIntFields implements QueryParameter<TaskQuery,
|
|||
+ "'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;
|
||||
/**
|
||||
* Filter by upper bound of customInt6.
|
||||
*
|
||||
* <p>This parameter can't be used together with 'custom-int-6-within'.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-int-6-to",
|
||||
description =
|
||||
|
@ -642,13 +545,11 @@ public class TaskQueryFilterCustomIntFields implements QueryParameter<TaskQuery,
|
|||
+ "'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 =
|
||||
|
@ -656,29 +557,21 @@ public class TaskQueryFilterCustomIntFields implements QueryParameter<TaskQuery,
|
|||
@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;
|
||||
/**
|
||||
* Filter by lower bound of customInt7.
|
||||
*
|
||||
* <p>This parameter can't be used together with 'custom-int-7-within'.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-int-7-from",
|
||||
description =
|
||||
|
@ -686,17 +579,11 @@ public class TaskQueryFilterCustomIntFields implements QueryParameter<TaskQuery,
|
|||
+ "'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;
|
||||
/**
|
||||
* Filter by upper bound of customInt7.
|
||||
*
|
||||
* <p>This parameter can't be used together with 'custom-int-7-within'.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-int-7-to",
|
||||
description =
|
||||
|
@ -704,13 +591,11 @@ public class TaskQueryFilterCustomIntFields implements QueryParameter<TaskQuery,
|
|||
+ "'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 =
|
||||
|
@ -718,29 +603,21 @@ public class TaskQueryFilterCustomIntFields implements QueryParameter<TaskQuery,
|
|||
@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;
|
||||
/**
|
||||
* Filter by lower bound of customInt8.
|
||||
*
|
||||
* <p>This parameter can't be used together with 'custom-int-8-within'.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-int-8-from",
|
||||
description =
|
||||
|
@ -748,17 +625,11 @@ public class TaskQueryFilterCustomIntFields implements QueryParameter<TaskQuery,
|
|||
+ "'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;
|
||||
/**
|
||||
* Filter by upper bound of customInt8.
|
||||
*
|
||||
* <p>This parameter can't be used together with 'custom-int-8-within'.
|
||||
*/
|
||||
@Schema(
|
||||
name = "custom-int-8-to",
|
||||
description =
|
||||
|
@ -766,7 +637,6 @@ public class TaskQueryFilterCustomIntFields implements QueryParameter<TaskQuery,
|
|||
+ "'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.")
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,10 +1,10 @@
|
|||
package pro.taskana.task.rest.models;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import pro.taskana.task.api.models.Attachment;
|
||||
|
||||
/** EntityModel class for {@link Attachment}. */
|
||||
@Schema(description = "EntityModel class for Attachment")
|
||||
public class AttachmentRepresentationModel extends AttachmentSummaryRepresentationModel {
|
||||
|
||||
/** All additional information of the Attachment. */
|
||||
|
|
|
@ -4,34 +4,25 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||
import java.time.Instant;
|
||||
import org.springframework.hateoas.RepresentationModel;
|
||||
import pro.taskana.classification.rest.models.ClassificationSummaryRepresentationModel;
|
||||
import pro.taskana.task.api.models.AttachmentSummary;
|
||||
|
||||
/** EntityModel class for {@link AttachmentSummary}. */
|
||||
@Schema(description = "EntityModel class for AttachmentSummary")
|
||||
public class AttachmentSummaryRepresentationModel
|
||||
extends RepresentationModel<AttachmentSummaryRepresentationModel> {
|
||||
|
||||
/** Unique Id. */
|
||||
@Schema(name = "attachmentId", description = "Unique Id.")
|
||||
protected String attachmentId;
|
||||
/** the referenced task id. */
|
||||
@Schema(name = "taskId", description = "The referenced task id.")
|
||||
protected String taskId;
|
||||
/** The creation timestamp in the system. */
|
||||
@Schema(name = "created", description = "The creation timestamp in the system.")
|
||||
protected Instant created;
|
||||
/** The timestamp of the last modification. */
|
||||
@Schema(name = "modified", description = "The timestamp of the last modification.")
|
||||
protected Instant modified;
|
||||
/** The timestamp of the entry date. */
|
||||
@Schema(name = "received", description = "The timestamp of the entry date.")
|
||||
protected Instant received;
|
||||
/** The classification of this attachment. */
|
||||
@Schema(name = "classificationSummary", description = "The classification of this attachment.")
|
||||
protected ClassificationSummaryRepresentationModel classificationSummary;
|
||||
/** The Objects primary ObjectReference. */
|
||||
@Schema(name = "objectReference", description = "The Objects primary ObjectReference.")
|
||||
protected ObjectReferenceRepresentationModel objectReference;
|
||||
/** Determines on which channel this attachment was received. */
|
||||
@Schema(
|
||||
name = "channel",
|
||||
description = "Determines on which channel this attachment was received.")
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
package pro.taskana.task.rest.models;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.beans.ConstructorProperties;
|
||||
|
||||
public class IsReadRepresentationModel {
|
||||
|
||||
/** The value to set the Task property isRead. */
|
||||
@Schema(name = "is-read", description = "The value to set the Task property isRead.")
|
||||
@JsonProperty("is-read")
|
||||
private final boolean isRead;
|
||||
|
||||
|
|
|
@ -6,32 +6,25 @@ import org.springframework.hateoas.RepresentationModel;
|
|||
public class ObjectReferenceRepresentationModel
|
||||
extends RepresentationModel<ObjectReferenceRepresentationModel> {
|
||||
|
||||
/** Unique ID. */
|
||||
@Schema(description = "Unique ID.")
|
||||
private String id;
|
||||
|
||||
/** Task Id. */
|
||||
@Schema(description = "Task Id.")
|
||||
private String taskId;
|
||||
/** The company the referenced primary object belongs to. */
|
||||
@Schema(description = "The company the referenced primary object belongs to.")
|
||||
private String company;
|
||||
/** The (kind of) system, the referenced primary object resides in (e.g. SAP, MySystem A, ...). */
|
||||
@Schema(
|
||||
description =
|
||||
"The (kind of) system, the referenced primary object resides in (e.g. SAP, MySystem A, "
|
||||
+ "...).")
|
||||
private String system;
|
||||
/** The instance of the system where the referenced primary object is located. */
|
||||
@Schema(
|
||||
description = "The instance of the system where the referenced primary object is located.")
|
||||
private String systemInstance;
|
||||
/** The type of the referenced primary object (contract, claim, policy, customer, ...). */
|
||||
@Schema(
|
||||
description =
|
||||
"The type of the referenced primary object (contract, claim, policy, customer, ...).")
|
||||
private String type;
|
||||
/** The value of the primary object reference. */
|
||||
@Schema(description = "The value of the primary object reference.")
|
||||
private String value;
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@ public class TaskCommentCollectionRepresentationModel
|
|||
super(content);
|
||||
}
|
||||
|
||||
/** The embedded task comments. */
|
||||
@Schema(name = "taskComments", description = "The embedded task comments.")
|
||||
@JsonProperty("taskComments")
|
||||
@Override
|
||||
|
|
|
@ -6,28 +6,22 @@ import org.springframework.hateoas.RepresentationModel;
|
|||
import pro.taskana.task.api.models.TaskComment;
|
||||
|
||||
/** EntityModel class for {@link TaskComment}. */
|
||||
@Schema(description = "EntityModel class for TaskComment")
|
||||
public class TaskCommentRepresentationModel
|
||||
extends RepresentationModel<TaskCommentRepresentationModel> {
|
||||
|
||||
/** Unique Id. */
|
||||
@Schema(name = "taskCommentId", description = "Unique Id.")
|
||||
private String taskCommentId;
|
||||
/** Task Id. Can identify the task the comment belongs to. */
|
||||
@Schema(name = "taskId", description = "Task Id. Can identify the task the comment belongs to.")
|
||||
private String taskId;
|
||||
/** The content of the comment. */
|
||||
@Schema(name = "textField", description = "The content of the comment.")
|
||||
private String textField;
|
||||
/** The creator of the task comment. */
|
||||
@Schema(name = "creator", description = "The creator of the task comment.")
|
||||
private String creator;
|
||||
/** The long name of the task comment creator. */
|
||||
@Schema(name = "creatorFullName", description = "The long name of the task comment creator.")
|
||||
private String creatorFullName;
|
||||
/** The creation timestamp in the system. */
|
||||
@Schema(name = "created", description = "The creation timestamp in the system.")
|
||||
private Instant created;
|
||||
/** Timestamp of the last task comment modification. */
|
||||
@Schema(name = "modified", description = "Timestamp of the last task comment modification.")
|
||||
private Instant modified;
|
||||
|
||||
|
|
|
@ -8,20 +8,17 @@ import java.util.List;
|
|||
import java.util.Map.Entry;
|
||||
import pro.taskana.task.api.models.Task;
|
||||
|
||||
/** EntityModel class for {@link Task}. */
|
||||
@Schema(description = "EntityModel class for Task")
|
||||
@JsonIgnoreProperties("attachmentSummaries")
|
||||
public class TaskRepresentationModel extends TaskSummaryRepresentationModel {
|
||||
|
||||
// All objects have to be serializable
|
||||
/** Additional information of the task. */
|
||||
@Schema(name = "customAttributes", description = "Additional information of the task.")
|
||||
private List<CustomAttribute> customAttributes = Collections.emptyList();
|
||||
|
||||
/** Callback Information of the task. */
|
||||
@Schema(name = "callbackInfo", description = "Callback Information of the task.")
|
||||
private List<CustomAttribute> callbackInfo = Collections.emptyList();
|
||||
|
||||
/** Attachments of the task. */
|
||||
@Schema(name = "attachments", description = "Attachments of the task.")
|
||||
private List<AttachmentRepresentationModel> attachments = new ArrayList<>();
|
||||
|
||||
|
@ -53,12 +50,11 @@ public class TaskRepresentationModel extends TaskSummaryRepresentationModel {
|
|||
* A CustomAttribute is a user customized attribute which is saved as a Map and can be retreived
|
||||
* from either {@link Task#getCustomAttributeMap()} or {@link Task#getCallbackInfo()}.
|
||||
*/
|
||||
@Schema(description = "A CustomAttribute is a user customized attribute which is saved as a Map.")
|
||||
public static class CustomAttribute {
|
||||
|
||||
/** the key of the custom attribute. */
|
||||
@Schema(name = "key", description = "the key of the custom attribute.")
|
||||
private String key;
|
||||
/** the value of the custom attribute. */
|
||||
@Schema(name = "value", description = "the value of the custom attribute.")
|
||||
private String value;
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@ public class TaskSummaryCollectionRepresentationModel
|
|||
super(content);
|
||||
}
|
||||
|
||||
/** The embedded tasks. */
|
||||
@Schema(name = "tasks", description = "The embedded tasks.")
|
||||
@JsonProperty("tasks")
|
||||
@Override
|
||||
|
|
|
@ -16,7 +16,6 @@ public class TaskSummaryPagedRepresentationModel
|
|||
super(content, pageMetadata);
|
||||
}
|
||||
|
||||
/** The embedded tasks. */
|
||||
@Schema(name = "tasks", description = "The embedded tasks.")
|
||||
@JsonProperty("tasks")
|
||||
@Override
|
||||
|
|
|
@ -15,80 +15,50 @@ import pro.taskana.workbasket.rest.models.WorkbasketSummaryRepresentationModel;
|
|||
public class TaskSummaryRepresentationModel
|
||||
extends RepresentationModel<TaskSummaryRepresentationModel> {
|
||||
|
||||
/** Unique Id. */
|
||||
@Schema(name = "taskId", description = "Unique Id.")
|
||||
protected String taskId;
|
||||
/**
|
||||
* External Id. Can be used to enforce idempotence at task creation. Can identify an external
|
||||
* task.
|
||||
*/
|
||||
@Schema(
|
||||
name = "externalId",
|
||||
description =
|
||||
"External Id. Can be used to enforce idempotence at task creation. Can identify an "
|
||||
+ "external task.")
|
||||
protected String externalId;
|
||||
/** The creation timestamp in the system. */
|
||||
@Schema(name = "created", description = "The creation timestamp in the system.")
|
||||
protected Instant created;
|
||||
/** The timestamp of the last claim-operation. */
|
||||
@Schema(name = "claimed", description = "The timestamp of the last claim-operation.")
|
||||
protected Instant claimed;
|
||||
/** The timestamp of the completion. */
|
||||
@Schema(name = "completed", description = "The timestamp of the completion.")
|
||||
protected Instant completed;
|
||||
/** The timestamp of the last modification. */
|
||||
@Schema(name = "modified", description = "The timestamp of the last modification.")
|
||||
protected Instant modified;
|
||||
/**
|
||||
* Planned start of the task. The actual completion of the task should be between PLANNED and DUE.
|
||||
*/
|
||||
@Schema(
|
||||
name = "planned",
|
||||
description =
|
||||
"Planned start of the task. The actual completion of the task should be between PLANNED"
|
||||
+ " and DUE.")
|
||||
protected Instant planned;
|
||||
/**
|
||||
* Timestamp when the task has been received. It notes when the surrounding process started and
|
||||
* not just when the actual task was created.
|
||||
*/
|
||||
@Schema(
|
||||
name = "received",
|
||||
description =
|
||||
"Timestamp when the task has been received. It notes when the surrounding process started"
|
||||
+ " and not just when the actual task was created.")
|
||||
protected Instant received;
|
||||
/**
|
||||
* Timestamp when the task is due. The actual completion of the task should be between PLANNED and
|
||||
* DUE.
|
||||
*/
|
||||
@Schema(
|
||||
name = "due",
|
||||
description =
|
||||
"Timestamp when the task is due. The actual completion of the task should be between "
|
||||
+ "PLANNED and DUE.")
|
||||
protected Instant due;
|
||||
/** The name of the task. */
|
||||
@Schema(name = "name", description = "The name of the task.")
|
||||
protected String name;
|
||||
/** the creator of the task. */
|
||||
@Schema(name = "creator", description = "the creator of the task.")
|
||||
protected String creator;
|
||||
/** note. */
|
||||
@Schema(name = "note", description = "note.")
|
||||
protected String note;
|
||||
/** The description of the task. */
|
||||
@Schema(name = "description", description = "The description of the task.")
|
||||
protected String description;
|
||||
/** The priority of the task. */
|
||||
@Schema(name = "priority", description = "The priority of the task.")
|
||||
protected int priority;
|
||||
/**
|
||||
* The manual priority of the task. If the value of manualPriority is zero or greater, the
|
||||
* priority is automatically set to manualPriority. In this case, all computations of priority are
|
||||
* disabled. If the value of manualPriority is negative, Tasks are not prioritized manually.
|
||||
*/
|
||||
@Schema(
|
||||
name = "manualPriority",
|
||||
description =
|
||||
|
@ -97,7 +67,6 @@ public class TaskSummaryRepresentationModel
|
|||
+ " priority are disabled. If the value of manualPriority is negative, Tasks are not"
|
||||
+ " prioritized manually.")
|
||||
protected int manualPriority = DEFAULT_MANUAL_PRIORITY;
|
||||
/** The current task state. */
|
||||
@Schema(
|
||||
name = "state",
|
||||
description =
|
||||
|
@ -106,119 +75,84 @@ public class TaskSummaryRepresentationModel
|
|||
+ " priority are disabled. If the value of manualPriority is negative, Tasks are not "
|
||||
+ "prioritized manually.")
|
||||
protected TaskState state;
|
||||
/** The classification of this task. */
|
||||
@Schema(name = "classificationSummary", description = "The classification of this task.")
|
||||
@NotNull
|
||||
protected ClassificationSummaryRepresentationModel classificationSummary;
|
||||
/** The workbasket this task resides in. */
|
||||
@Schema(name = "workbasketSummary", description = "The workbasket this task resides in.")
|
||||
@NotNull
|
||||
protected WorkbasketSummaryRepresentationModel workbasketSummary;
|
||||
/** The business process id. */
|
||||
@Schema(name = "businessProcessId", description = "The classification of this task.")
|
||||
protected String businessProcessId;
|
||||
/** the parent business process id. */
|
||||
@Schema(name = "parentBusinessProcessId", description = "the parent business process id.")
|
||||
protected String parentBusinessProcessId;
|
||||
/** The owner of the task. The owner is set upon claiming of the task. */
|
||||
@Schema(
|
||||
name = "owner",
|
||||
description = "The owner of the task. The owner is set upon claiming of the task.")
|
||||
protected String owner;
|
||||
/** The long name of the task owner. */
|
||||
@Schema(name = "ownerLongName", description = "The long name of the task owner.")
|
||||
protected String ownerLongName;
|
||||
/** The Objects primary ObjectReference. */
|
||||
@Schema(name = "primaryObjRef", description = "The Objects primary ObjectReference.")
|
||||
@NotNull protected ObjectReferenceRepresentationModel primaryObjRef;
|
||||
/** Indicator if the task has been read. */
|
||||
@Schema(name = "isRead", description = "The Objects primary ObjectReference.")
|
||||
@Schema(name = "isRead", description = "Indicator if the task has been read.")
|
||||
protected boolean isRead;
|
||||
/** Indicator if the task has been transferred. */
|
||||
@Schema(name = "isTransferred", description = "Indicator if the task has been transferred.")
|
||||
protected boolean isTransferred;
|
||||
/** Number of Tasks that are grouped together with this Task during a groupBy. */
|
||||
@Schema(
|
||||
name = "groupByCount",
|
||||
description = "Number of Tasks that are grouped together with this Task during a groupBy.")
|
||||
protected Integer groupByCount;
|
||||
/** 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;
|
||||
/** A custom property with name "9". */
|
||||
@Schema(name = "custom9", description = "A custom property with name \"9\".")
|
||||
protected String custom9;
|
||||
/** A custom property with name "10". */
|
||||
@Schema(name = "custom10", description = "A custom property with name \"10\".")
|
||||
protected String custom10;
|
||||
/** A custom property with name "11". */
|
||||
@Schema(name = "custom11", description = "A custom property with name \"11\".")
|
||||
protected String custom11;
|
||||
/** A custom property with name "12". */
|
||||
@Schema(name = "custom12", description = "A custom property with name \"12\".")
|
||||
protected String custom12;
|
||||
/** A custom property with name "13". */
|
||||
@Schema(name = "custom13", description = "A custom property with name \"13\".")
|
||||
protected String custom13;
|
||||
/** A custom property with name "14". */
|
||||
@Schema(name = "custom14", description = "A custom property with name \"14\".")
|
||||
protected String custom14;
|
||||
/** A custom property with name "15". */
|
||||
@Schema(name = "custom15", description = "A custom property with name \"15\".")
|
||||
protected String custom15;
|
||||
/** A custom property with name "16". */
|
||||
@Schema(name = "custom16", description = "A custom property with name \"16\".")
|
||||
protected String custom16;
|
||||
/** A custom int property with name "1". */
|
||||
@Schema(name = "customInt1", description = "A custom int property with name \"1\".")
|
||||
protected Integer customInt1;
|
||||
/** A custom int property with name "2". */
|
||||
@Schema(name = "customInt2", description = "A custom int property with name \"2\".")
|
||||
protected Integer customInt2;
|
||||
/** A custom int property with name "3". */
|
||||
@Schema(name = "customInt3", description = "A custom int property with name \"3\".")
|
||||
protected Integer customInt3;
|
||||
/** A custom int property with name "4". */
|
||||
@Schema(name = "customInt4", description = "A custom int property with name \"4\".")
|
||||
protected Integer customInt4;
|
||||
/** A custom int property with name "5". */
|
||||
@Schema(name = "customInt5", description = "A custom int property with name \"5\".")
|
||||
protected Integer customInt5;
|
||||
/** A custom int property with name "6". */
|
||||
@Schema(name = "customInt6", description = "A custom int property with name \"6\".")
|
||||
protected Integer customInt6;
|
||||
/** A custom int property with name "7". */
|
||||
@Schema(name = "customInt7", description = "A custom int property with name \"7\".")
|
||||
protected Integer customInt7;
|
||||
/** A custom int property with name "8". */
|
||||
@Schema(name = "customInt8", description = "A custom int property with name \"8\".")
|
||||
protected Integer customInt8;
|
||||
/** Secondary object references of the task. */
|
||||
@Schema(
|
||||
name = "secondaryObjectReferences",
|
||||
description = "Secondary object references of the task.")
|
||||
protected List<ObjectReferenceRepresentationModel> secondaryObjectReferences = new ArrayList<>();
|
||||
/** The attachment summaries of this task. */
|
||||
@Schema(name = "attachmentSummaries", description = "The attachment summaries of this task.")
|
||||
private List<AttachmentSummaryRepresentationModel> attachmentSummaries = new ArrayList<>();
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@ public class UserCollectionRepresentationModel
|
|||
super(content);
|
||||
}
|
||||
|
||||
/** The embedded users. */
|
||||
@Schema(name = "users", description = "The embedded users.")
|
||||
@JsonProperty("users")
|
||||
@Override
|
||||
|
|
|
@ -6,61 +6,38 @@ import java.util.Collections;
|
|||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import org.springframework.hateoas.RepresentationModel;
|
||||
import pro.taskana.user.api.models.User;
|
||||
|
||||
/** The entityModel class for {@linkplain User}. */
|
||||
@Schema(description = "The entityModel class for User")
|
||||
public class UserRepresentationModel extends RepresentationModel<UserRepresentationModel> {
|
||||
|
||||
/** Unique Id. */
|
||||
@Schema(name = "userId", description = "Unique Id.")
|
||||
@NotNull private String userId;
|
||||
/** The groups of the User. */
|
||||
@Schema(name = "groups", description = "The groups of the User.")
|
||||
private Set<String> groups;
|
||||
/** The permissions of the User. */
|
||||
@Schema(name = "permissions", description = "The permissions of the User.")
|
||||
private Set<String> permissions;
|
||||
/**
|
||||
* The domains of the User.
|
||||
*
|
||||
* <p>The domains are derived from the WorkbasketPermissions and the according TASKANA property
|
||||
* taskana.user.minimalPermissionsToAssignDomains
|
||||
*/
|
||||
private Set<String> domains = Collections.emptySet();
|
||||
/** The first name of the User. */
|
||||
@Schema(name = "firstName", description = "The first name of the User.")
|
||||
private String firstName;
|
||||
/** The last name of the User. */
|
||||
@Schema(name = "lastName", description = "The last name of the User.")
|
||||
private String lastName;
|
||||
/** The full name of the User. */
|
||||
@Schema(name = "fullName", description = "The full name of the User.")
|
||||
private String fullName;
|
||||
/** The long name of the User. */
|
||||
@Schema(name = "longName", description = "The long name of the User.")
|
||||
private String longName;
|
||||
/** The email of the User. */
|
||||
@Schema(name = "email", description = "The email of the User.")
|
||||
private String email;
|
||||
/** The phone number of the User. */
|
||||
@Schema(name = "phone", description = "The phone number of the User.")
|
||||
private String phone;
|
||||
/** The mobile phone number of the User. */
|
||||
@Schema(name = "mobilePhone", description = "The mobile phone number of the User.")
|
||||
private String mobilePhone;
|
||||
/** The fourth organisation level of the User. */
|
||||
@Schema(name = "orgLevel4", description = "The fourth organisation level of the User.")
|
||||
private String orgLevel4;
|
||||
/** The third organisation level of the User. */
|
||||
@Schema(name = "orgLevel3", description = "The third organisation level of the User.")
|
||||
private String orgLevel3;
|
||||
/** The second organisation level of the User. */
|
||||
@Schema(name = "orgLevel2", description = "The second organisation level of the User.")
|
||||
private String orgLevel2;
|
||||
/** The first organisation level of the User. */
|
||||
@Schema(name = "orgLevel1", description = "The first organisation level of the User.")
|
||||
private String orgLevel1;
|
||||
/** The data of the User. This field is used for additional information about the User. */
|
||||
@Schema(
|
||||
name = "data",
|
||||
description =
|
||||
|
|
|
@ -25,18 +25,12 @@ public class WorkbasketAccessItemQueryFilterParameter
|
|||
return accessIdLike;
|
||||
}
|
||||
|
||||
/** Filter by the key of the Workbasket. This is an exact match. */
|
||||
@Schema(
|
||||
name = "workbasket-key",
|
||||
description = "Filter by the key of the Workbasket. This is an exact match.")
|
||||
@JsonProperty("workbasket-key")
|
||||
private final String[] workbasketKey;
|
||||
|
||||
/**
|
||||
* Filter by the key of the Workbasket. This results in a substring search.. (% is appended to the
|
||||
* beginning and end of the requested value). Further SQL "LIKE" wildcard characters will be
|
||||
* resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "workbasket-key-like",
|
||||
description =
|
||||
|
@ -46,18 +40,12 @@ public class WorkbasketAccessItemQueryFilterParameter
|
|||
@JsonProperty("workbasket-key-like")
|
||||
private final String[] workbasketKeyLike;
|
||||
|
||||
/** Filter by the name of the access id. This is an exact match. */
|
||||
@Schema(
|
||||
name = "access-id",
|
||||
description = "Filter by the name of the access id. This is an exact match.")
|
||||
@JsonProperty("access-id")
|
||||
private final String[] accessId;
|
||||
|
||||
/**
|
||||
* Filter by the name of the access id. This results in a substring search.. (% is appended to the
|
||||
* beginning and end of the requested value). Further SQL "LIKE" wildcard characters will be
|
||||
* resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "access-id-like",
|
||||
description =
|
||||
|
|
|
@ -11,18 +11,12 @@ import pro.taskana.workbasket.api.WorkbasketType;
|
|||
|
||||
public class WorkbasketQueryFilterParameter implements QueryParameter<WorkbasketQuery, Void> {
|
||||
|
||||
/** 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;
|
||||
|
||||
/**
|
||||
* Filter by the name of the Workbasket. This results in a substring search. (% is appended to the
|
||||
* beginning and end of the requested value). Further SQL "LIKE" wildcard characters will be
|
||||
* resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "name-like",
|
||||
description =
|
||||
|
@ -32,18 +26,12 @@ public class WorkbasketQueryFilterParameter implements QueryParameter<Workbasket
|
|||
@JsonProperty("name-like")
|
||||
private final String[] nameLike;
|
||||
|
||||
/** Filter by the key of the Workbasket. This is an exact match. */
|
||||
@Schema(
|
||||
name = "key",
|
||||
description = "Filter by the key of the Workbasket. This is an exact match.")
|
||||
@JsonProperty("key")
|
||||
private final String[] key;
|
||||
|
||||
/**
|
||||
* Filter by the key of the Workbasket. This results in a substring search.. (% is appended to the
|
||||
* beginning and end of the requested value). Further SQL "LIKE" wildcard characters will be
|
||||
* resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "key-like",
|
||||
description =
|
||||
|
@ -53,18 +41,12 @@ public class WorkbasketQueryFilterParameter implements QueryParameter<Workbasket
|
|||
@JsonProperty("key-like")
|
||||
private final String[] keyLike;
|
||||
|
||||
/** Filter by the owner of the Workbasket. This is an exact match. */
|
||||
@Schema(
|
||||
name = "owner",
|
||||
description = "Filter by the owner of the Workbasket. This is an exact match.")
|
||||
@JsonProperty("owner")
|
||||
private final String[] owner;
|
||||
|
||||
/**
|
||||
* Filter by the owner of the Workbasket. This results in a substring search.. (% is appended to
|
||||
* the beginning and end of the requested value). Further SQL "LIKE" wildcard characters will be
|
||||
* resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "owner-like",
|
||||
description =
|
||||
|
@ -74,11 +56,6 @@ public class WorkbasketQueryFilterParameter implements QueryParameter<Workbasket
|
|||
@JsonProperty("owner-like")
|
||||
private final String[] ownerLike;
|
||||
|
||||
/**
|
||||
* Filter by the description of the Workbasket. This results in a substring search.. (% is
|
||||
* appended to the beginning and end of the requested value). Further SQL "LIKE" wildcard
|
||||
* characters will be resolved correctly.
|
||||
*/
|
||||
@Schema(
|
||||
name = "description-like",
|
||||
description =
|
||||
|
@ -88,21 +65,18 @@ public class WorkbasketQueryFilterParameter implements QueryParameter<Workbasket
|
|||
@JsonProperty("description-like")
|
||||
private final String[] descriptionLike;
|
||||
|
||||
/** Filter by the domain of the Workbasket. This is an exact match. */
|
||||
@Schema(
|
||||
name = "domain",
|
||||
description = "Filter by the domain of the Workbasket. This is an exact match.")
|
||||
@JsonProperty("domain")
|
||||
private final String[] domain;
|
||||
|
||||
/** Filter by the type of the Workbasket. This is an exact match. */
|
||||
@Schema(
|
||||
name = "type",
|
||||
description = "Filter by the type of the Workbasket. This is an exact match.")
|
||||
@JsonProperty("type")
|
||||
private final WorkbasketType[] type;
|
||||
|
||||
/** Filter by the required permission for the Workbasket. */
|
||||
@Schema(
|
||||
name = "required-permission",
|
||||
description = "Filter by the required permission for the Workbasket.")
|
||||
|
|
|
@ -15,7 +15,6 @@ public class DistributionTargetsCollectionRepresentationModel
|
|||
super(content);
|
||||
}
|
||||
|
||||
/** the embedded distribution targets. */
|
||||
@Schema(name = "distributionTargets", description = "the embedded distribution targets.")
|
||||
@JsonProperty("distributionTargets")
|
||||
@Override
|
||||
|
|
|
@ -15,7 +15,6 @@ public class WorkbasketAccessItemCollectionRepresentationModel
|
|||
super(content);
|
||||
}
|
||||
|
||||
/** the embedded access items. */
|
||||
@JsonProperty("accessItems")
|
||||
@Schema(name = "accessItems", description = "the embedded access items.")
|
||||
@Override
|
||||
|
|
|
@ -16,7 +16,6 @@ public class WorkbasketAccessItemPagedRepresentationModel
|
|||
super(content, pageMetadata);
|
||||
}
|
||||
|
||||
/** the embedded access items. */
|
||||
@Schema(name = "accessItems", description = "the embedded access items.")
|
||||
@JsonProperty("accessItems")
|
||||
@Override
|
||||
|
|
|
@ -2,102 +2,75 @@ package pro.taskana.workbasket.rest.models;
|
|||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.springframework.hateoas.RepresentationModel;
|
||||
import pro.taskana.workbasket.api.models.WorkbasketAccessItem;
|
||||
|
||||
/** EntityModel class for {@link WorkbasketAccessItem}. */
|
||||
@Schema(description = "EntityModel class for WorkbasketAccessItem")
|
||||
public class WorkbasketAccessItemRepresentationModel
|
||||
extends RepresentationModel<WorkbasketAccessItemRepresentationModel> {
|
||||
|
||||
/** Unique Id. */
|
||||
@Schema(name = "accessItemId", description = "Unique Id.")
|
||||
private String accessItemId;
|
||||
/** The workbasket Id. */
|
||||
@Schema(name = "workbasketId", description = "The workbasket Id.")
|
||||
private String workbasketId;
|
||||
/** The Access Id. This could be either a user Id or a full qualified group Id. */
|
||||
@Schema(
|
||||
name = "accessId",
|
||||
description = "The Access Id. This could be either a user Id or a full qualified group Id.")
|
||||
private String accessId;
|
||||
/** The workbasket key. */
|
||||
@Schema(name = "workbasketKey", description = "The workbasket key.")
|
||||
private String workbasketKey;
|
||||
/** The name. */
|
||||
@Schema(name = "accessName", description = "The name.")
|
||||
private String accessName;
|
||||
/** The permission to read the information about the workbasket. */
|
||||
@Schema(
|
||||
name = "permRead",
|
||||
description = "The permission to read the information about the workbasket.")
|
||||
private boolean permRead;
|
||||
/** The permission to access a task from the workbasket. */
|
||||
@Schema(
|
||||
name = "permReadTasks",
|
||||
description = "The permission to access a task from the workbasket.")
|
||||
private boolean permReadTasks;
|
||||
/** The permission to view the content (the tasks) of a workbasket. */
|
||||
@Schema(
|
||||
name = "permOpen",
|
||||
description = "The permission to view the content (the tasks) of a workbasket.")
|
||||
private boolean permOpen;
|
||||
/**
|
||||
* The permission to add tasks to the workbasket. Required for creation and transferring of tasks.
|
||||
*/
|
||||
@Schema(
|
||||
name = "permAppend",
|
||||
description =
|
||||
"The permission to add tasks to the workbasket. Required for creation and transferring "
|
||||
+ "of tasks.")
|
||||
private boolean permAppend;
|
||||
/** The permission to edit a task from the workbasket. */
|
||||
@Schema(
|
||||
name = "permEditTasks",
|
||||
description = "The permission to edit a task from the workbasket.")
|
||||
private boolean permEditTasks;
|
||||
/** The permission to transfer tasks (out of the current workbasket). */
|
||||
@Schema(
|
||||
name = "permTransfer",
|
||||
description = "The permission to transfer tasks (out of the current workbasket).")
|
||||
private boolean permTransfer;
|
||||
/** The permission to distribute tasks from the workbasket. */
|
||||
@Schema(
|
||||
name = "permDistribute",
|
||||
description = "The permission to distribute tasks from the workbasket.")
|
||||
private boolean permDistribute;
|
||||
/** The custom permission with the name "1". */
|
||||
@Schema(name = "permCustom1", description = "The custom permission with the name '1'.")
|
||||
private boolean permCustom1;
|
||||
/** The custom permission with the name "2". */
|
||||
@Schema(name = "permCustom2", description = "The custom permission with the name '2'.")
|
||||
private boolean permCustom2;
|
||||
/** The custom permission with the name "3". */
|
||||
@Schema(name = "permCustom3", description = "The custom permission with the name '3'.")
|
||||
private boolean permCustom3;
|
||||
/** The custom permission with the name "4". */
|
||||
@Schema(name = "permCustom4", description = "The custom permission with the name '4'.")
|
||||
private boolean permCustom4;
|
||||
/** The custom permission with the name "5". */
|
||||
@Schema(name = "permCustom5", description = "The custom permission with the name '5'.")
|
||||
private boolean permCustom5;
|
||||
/** The custom permission with the name "6". */
|
||||
@Schema(name = "permCustom6", description = "The custom permission with the name '6'.")
|
||||
private boolean permCustom6;
|
||||
/** The custom permission with the name "7". */
|
||||
@Schema(name = "permCustom7", description = "The custom permission with the name '7'.")
|
||||
private boolean permCustom7;
|
||||
/** The custom permission with the name "8". */
|
||||
@Schema(name = "permCustom8", description = "The custom permission with the name '8'.")
|
||||
private boolean permCustom8;
|
||||
/** The custom permission with the name "9". */
|
||||
@Schema(name = "permCustom9", description = "The custom permission with the name '9'.")
|
||||
private boolean permCustom9;
|
||||
/** The custom permission with the name "10". */
|
||||
@Schema(name = "permCustom10", description = "The custom permission with the name '10'.")
|
||||
private boolean permCustom10;
|
||||
/** The custom permission with the name "11". */
|
||||
@Schema(name = "permCustom11", description = "The custom permission with the name '11'.")
|
||||
private boolean permCustom11;
|
||||
/** The custom permission with the name "12". */
|
||||
@Schema(name = "permCustom12", description = "The custom permission with the name '12'.")
|
||||
private boolean permCustom12;
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@ public class WorkbasketDefinitionCollectionRepresentationModel
|
|||
super(content);
|
||||
}
|
||||
|
||||
/** the embedded workbasket definitions. */
|
||||
@Schema(name = "workbasketDefinitions", description = "the embedded workbasket definitions.")
|
||||
@JsonProperty("workbasketDefinitions")
|
||||
@Override
|
||||
|
|
|
@ -8,18 +8,19 @@ import java.util.HashSet;
|
|||
import java.util.Set;
|
||||
import org.springframework.hateoas.RepresentationModel;
|
||||
|
||||
/** this class represents a workbasket including its distro targets and authorisations. */
|
||||
@Schema(
|
||||
description =
|
||||
"this class represents a workbasket including its distro targets and " + "authorisations.")
|
||||
public class WorkbasketDefinitionRepresentationModel
|
||||
extends RepresentationModel<WorkbasketDefinitionRepresentationModel> {
|
||||
|
||||
/** The workbasket which is represented. */
|
||||
@Schema(name = "workbasket", description = "The workbasket which is represented.")
|
||||
@JsonIgnoreProperties("_links")
|
||||
private WorkbasketRepresentationModel workbasket;
|
||||
/** The workbasket authorizations. */
|
||||
|
||||
@Schema(name = "authorizations", description = "The workbasket authorizations.")
|
||||
private Collection<WorkbasketAccessItemRepresentationModel> authorizations = new ArrayList<>();
|
||||
/** The distribution targets for this workbasket. */
|
||||
|
||||
@Schema(
|
||||
name = "distributionTargets",
|
||||
description = "The distribution targets for this workbasket.")
|
||||
|
|
|
@ -2,27 +2,16 @@ 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;
|
||||
|
||||
/** EntityModel class for {@link Workbasket}. */
|
||||
@Schema(description = "EntityModel class for Workbasket")
|
||||
public class WorkbasketRepresentationModel extends WorkbasketSummaryRepresentationModel {
|
||||
|
||||
/**
|
||||
* The creation timestamp of the workbasket in the system.
|
||||
*
|
||||
* <p>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.
|
||||
*
|
||||
* <p>The format is ISO-8601.
|
||||
*/
|
||||
@Schema(
|
||||
name = "modified",
|
||||
description =
|
||||
|
|
|
@ -16,7 +16,6 @@ public class WorkbasketSummaryPagedRepresentationModel
|
|||
super(content, pageMetadata);
|
||||
}
|
||||
|
||||
/** the embedded workbaskets. */
|
||||
@Schema(name = "workbaskets", description = "the embedded workbaskets.")
|
||||
@JsonProperty("workbaskets")
|
||||
@Override
|
||||
|
|
|
@ -3,40 +3,29 @@ 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;
|
||||
|
||||
/** EntityModel class for {@link WorkbasketSummary}. */
|
||||
@Schema(description = "EntityModel class for WorkbasketSummary.")
|
||||
public class WorkbasketSummaryRepresentationModel
|
||||
extends RepresentationModel<WorkbasketSummaryRepresentationModel> {
|
||||
|
||||
/** 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 =
|
||||
|
@ -44,45 +33,30 @@ public class WorkbasketSummaryRepresentationModel
|
|||
+ "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).
|
||||
*
|
||||
* <p>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.
|
||||
*/
|
||||
@Schema(
|
||||
name = "orgLevel1",
|
||||
description =
|
||||
|
@ -92,19 +66,18 @@ public class WorkbasketSummaryRepresentationModel
|
|||
+ " 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. */
|
||||
|
||||
@Schema(
|
||||
name = "markedForDeletion",
|
||||
description = "Identifier to tell if this workbasket can be " + "deleted.")
|
||||
private boolean markedForDeletion;
|
||||
|
||||
public String getWorkbasketId() {
|
||||
|
|
|
@ -481,4 +481,34 @@ class ClassificationControllerIntTest {
|
|||
.extracting(HttpStatusCodeException::getStatusCode)
|
||||
.isEqualTo(HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
|
||||
@Test
|
||||
void should_UpdateClassification_When_NameIsChanged() {
|
||||
String url =
|
||||
restHelper.toUrl(
|
||||
RestEndpoints.URL_CLASSIFICATIONS_ID, "CLI:000000000000000000000000000000000004");
|
||||
HttpEntity<?> auth = new HttpEntity<>(RestHelper.generateHeadersForUser("admin"));
|
||||
ResponseEntity<ClassificationRepresentationModel> responseGet =
|
||||
TEMPLATE.exchange(
|
||||
url,
|
||||
HttpMethod.GET,
|
||||
auth,
|
||||
ParameterizedTypeReference.forType(ClassificationRepresentationModel.class));
|
||||
|
||||
final ClassificationRepresentationModel originalClassification = responseGet.getBody();
|
||||
originalClassification.setName("new name");
|
||||
HttpEntity<ClassificationRepresentationModel> httpEntity =
|
||||
new HttpEntity<>(originalClassification, RestHelper.generateHeadersForUser("admin"));
|
||||
|
||||
ResponseEntity<ClassificationRepresentationModel> responseUpdate =
|
||||
TEMPLATE.exchange(
|
||||
url,
|
||||
HttpMethod.PUT,
|
||||
httpEntity,
|
||||
ParameterizedTypeReference.forType(ClassificationRepresentationModel.class));
|
||||
|
||||
ClassificationRepresentationModel updatedClassification = responseUpdate.getBody();
|
||||
assertThat(updatedClassification).isNotNull();
|
||||
assertThat(updatedClassification.getName()).isEqualTo("new name");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,76 +0,0 @@
|
|||
package pro.taskana.classification.rest;
|
||||
|
||||
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.delete;
|
||||
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.get;
|
||||
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.post;
|
||||
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.put;
|
||||
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
|
||||
import pro.taskana.classification.api.ClassificationService;
|
||||
import pro.taskana.classification.api.models.Classification;
|
||||
import pro.taskana.classification.rest.assembler.ClassificationRepresentationModelAssembler;
|
||||
import pro.taskana.classification.rest.models.ClassificationRepresentationModel;
|
||||
import pro.taskana.common.rest.RestEndpoints;
|
||||
import pro.taskana.rest.test.BaseRestDocTest;
|
||||
|
||||
@Disabled
|
||||
class ClassificationControllerRestDocTest extends BaseRestDocTest {
|
||||
|
||||
@Autowired ClassificationRepresentationModelAssembler assembler;
|
||||
@Autowired ClassificationService classificationService;
|
||||
|
||||
@Test
|
||||
void getAllClassificationsDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(get(RestEndpoints.URL_CLASSIFICATIONS))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void getClassificationDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(
|
||||
get(RestEndpoints.URL_CLASSIFICATIONS_ID, "CLI:100000000000000000000000000000000009"))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void createClassificationDocTest() throws Exception {
|
||||
Classification classification =
|
||||
classificationService.newClassification("Key0815casdgdgh", "DOMAIN_B", "TASK");
|
||||
classification.setServiceLevel("P1D");
|
||||
ClassificationRepresentationModel repModel = assembler.toModel(classification);
|
||||
mockMvc
|
||||
.perform(
|
||||
post(RestEndpoints.URL_CLASSIFICATIONS)
|
||||
.content(objectMapper.writeValueAsString(repModel)))
|
||||
.andExpect(MockMvcResultMatchers.status().isCreated());
|
||||
}
|
||||
|
||||
@Test
|
||||
void deleteClassificationDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(
|
||||
delete(
|
||||
RestEndpoints.URL_CLASSIFICATIONS_ID, "CLI:100000000000000000000000000000000010"))
|
||||
.andExpect(MockMvcResultMatchers.status().isNoContent());
|
||||
}
|
||||
|
||||
@Test
|
||||
void updateClassificationDocTest() throws Exception {
|
||||
Classification classification =
|
||||
classificationService.getClassification("CLI:100000000000000000000000000000000009");
|
||||
classification.setName("new name");
|
||||
|
||||
ClassificationRepresentationModel repModel = assembler.toModel(classification);
|
||||
|
||||
mockMvc
|
||||
.perform(
|
||||
put(RestEndpoints.URL_CLASSIFICATIONS_ID, classification.getId())
|
||||
.content(objectMapper.writeValueAsString(repModel)))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
package pro.taskana.classification.rest;
|
||||
|
||||
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.get;
|
||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.multipart;
|
||||
|
||||
import java.util.List;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
|
||||
import pro.taskana.classification.api.ClassificationService;
|
||||
import pro.taskana.classification.api.models.Classification;
|
||||
import pro.taskana.classification.rest.assembler.ClassificationRepresentationModelAssembler;
|
||||
import pro.taskana.classification.rest.models.ClassificationCollectionRepresentationModel;
|
||||
import pro.taskana.common.rest.RestEndpoints;
|
||||
import pro.taskana.rest.test.BaseRestDocTest;
|
||||
|
||||
@Disabled
|
||||
class ClassificationDefinitionControllerRestDocTest extends BaseRestDocTest {
|
||||
|
||||
@Autowired ClassificationRepresentationModelAssembler assembler;
|
||||
@Autowired ClassificationService classificationService;
|
||||
|
||||
@Test
|
||||
void exportClassificationDefinitionsDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(get(RestEndpoints.URL_CLASSIFICATION_DEFINITIONS))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void importClassificationDefinitionsDocTest() throws Exception {
|
||||
Classification classification =
|
||||
classificationService.newClassification("Key0815", "DOMAIN_B", "TASK");
|
||||
classification.setServiceLevel("P1D");
|
||||
|
||||
ClassificationCollectionRepresentationModel importCollection =
|
||||
new ClassificationCollectionRepresentationModel(List.of(assembler.toModel(classification)));
|
||||
|
||||
this.mockMvc
|
||||
.perform(
|
||||
multipart(RestEndpoints.URL_CLASSIFICATION_DEFINITIONS)
|
||||
.file("file", objectMapper.writeValueAsBytes(importCollection)))
|
||||
.andExpect(MockMvcResultMatchers.status().isNoContent());
|
||||
}
|
||||
}
|
|
@ -277,4 +277,19 @@ class AccessIdControllerIntTest {
|
|||
.extracting(HttpStatusCodeException::getStatusCode)
|
||||
.isEqualTo(HttpStatus.FORBIDDEN);
|
||||
}
|
||||
|
||||
@Test
|
||||
void should_ReturnAccessIds_When_SearchingUsersByNameOrAccessId() {
|
||||
String url =
|
||||
restHelper.toUrl(RestEndpoints.URL_ACCESS_ID_WITH_NAME) + "?search-for=user-1&role=user";
|
||||
HttpEntity<Object> auth = new HttpEntity<>(RestHelper.generateHeadersForUser("admin"));
|
||||
|
||||
ResponseEntity<List<AccessIdRepresentationModel>> response =
|
||||
TEMPLATE.exchange(url, HttpMethod.GET, auth, ACCESS_ID_LIST_TYPE);
|
||||
|
||||
assertThat(response.getBody())
|
||||
.isNotNull()
|
||||
.extracting(AccessIdRepresentationModel::getAccessId)
|
||||
.containsExactlyInAnyOrder("user-1-1", "user-1-2");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
package pro.taskana.common.rest;
|
||||
|
||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
|
||||
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
|
||||
import pro.taskana.rest.test.BaseRestDocTest;
|
||||
|
||||
@Disabled
|
||||
class AccessIdControllerRestDocTest extends BaseRestDocTest {
|
||||
|
||||
@Test
|
||||
void searchForAccessIdDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(get(RestEndpoints.URL_ACCESS_ID + "?search-for=max"))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void getGroupsForAccessIdDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(get(RestEndpoints.URL_ACCESS_ID_GROUPS + "?access-id=teamlead-1"))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void searchUsersByNameOrAccessIdForRoleTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(get(RestEndpoints.URL_ACCESS_ID_WITH_NAME + "?search-for=user-1&role=user"))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
}
|
|
@ -3,6 +3,7 @@ package pro.taskana.common.rest;
|
|||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.ParameterizedTypeReference;
|
||||
|
@ -15,6 +16,7 @@ import org.springframework.web.client.RestTemplate;
|
|||
import pro.taskana.common.api.TaskanaRole;
|
||||
import pro.taskana.common.rest.models.CustomAttributesRepresentationModel;
|
||||
import pro.taskana.common.rest.models.TaskanaUserInfoRepresentationModel;
|
||||
import pro.taskana.common.rest.models.VersionRepresentationModel;
|
||||
import pro.taskana.rest.test.RestHelper;
|
||||
import pro.taskana.rest.test.TaskanaSpringBootTest;
|
||||
|
||||
|
@ -163,4 +165,70 @@ class TaskanaEngineControllerIntTest {
|
|||
|
||||
assertThat(response.getBody()).isNotNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
void should_ReturnFalse_When_NoHistoryProvider() {
|
||||
String url = restHelper.toUrl(RestEndpoints.URL_HISTORY_ENABLED);
|
||||
HttpEntity<?> auth = new HttpEntity<>(RestHelper.generateHeadersForUser("admin"));
|
||||
ResponseEntity<Boolean> response =
|
||||
TEMPLATE.exchange(
|
||||
url, HttpMethod.GET, auth, ParameterizedTypeReference.forType(Boolean.class));
|
||||
assertThat(response.getBody()).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
void should_ReturnCurrentVersion() {
|
||||
String url = restHelper.toUrl(RestEndpoints.URL_VERSION);
|
||||
HttpEntity<?> auth = new HttpEntity<>(RestHelper.generateHeadersForUser("admin"));
|
||||
ResponseEntity<VersionRepresentationModel> response =
|
||||
TEMPLATE.exchange(
|
||||
url,
|
||||
HttpMethod.GET,
|
||||
auth,
|
||||
ParameterizedTypeReference.forType(VersionRepresentationModel.class));
|
||||
assertThat(response.getBody().getVersion()).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
void should_SetCustomConfigurationAttributes() {
|
||||
String url = restHelper.toUrl(RestEndpoints.URL_CUSTOM_ATTRIBUTES);
|
||||
CustomAttributesRepresentationModel customAttributes =
|
||||
new CustomAttributesRepresentationModel(
|
||||
Map.of(
|
||||
"filter",
|
||||
"{ \"Tasks with state READY\": { \"state\": [\"READY\"]}, "
|
||||
+ "\"Tasks with state CLAIMED\": {\"state\": [\"CLAIMED\"] }}",
|
||||
"schema",
|
||||
Map.of(
|
||||
"Filter",
|
||||
Map.of(
|
||||
"displayName",
|
||||
"Filter for Task-Priority-Report",
|
||||
"members",
|
||||
Map.of(
|
||||
"filter",
|
||||
Map.of("displayName", "Filter values", "type", "json", "min", "1"))))));
|
||||
HttpEntity<CustomAttributesRepresentationModel> auth =
|
||||
new HttpEntity<>(customAttributes, RestHelper.generateHeadersForUser("admin"));
|
||||
ResponseEntity<CustomAttributesRepresentationModel> response =
|
||||
TEMPLATE.exchange(
|
||||
url,
|
||||
HttpMethod.PUT,
|
||||
auth,
|
||||
ParameterizedTypeReference.forType(CustomAttributesRepresentationModel.class));
|
||||
assertThat(response.getBody()).isEqualTo(customAttributes);
|
||||
}
|
||||
|
||||
@Test
|
||||
void should_GetClassificationCategoriesByType() {
|
||||
String url = restHelper.toUrl(RestEndpoints.URL_CLASSIFICATION_CATEGORIES_BY_TYPES);
|
||||
HttpEntity<?> auth = new HttpEntity<>(RestHelper.generateHeadersForUser("admin"));
|
||||
ResponseEntity<Map<String, List<String>>> response =
|
||||
TEMPLATE.exchange(url, HttpMethod.GET, auth, ParameterizedTypeReference.forType(Map.class));
|
||||
assertThat(response.getBody()).isNotNull();
|
||||
assertThat(response.getBody()).hasSize(2);
|
||||
assertThat(response.getBody().get("TASK"))
|
||||
.containsExactlyInAnyOrder("EXTERNAL", "MANUAL", "AUTOMATIC", "PROCESS");
|
||||
assertThat(response.getBody().get("DOCUMENT")).containsExactlyInAnyOrder("EXTERNAL");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,95 +0,0 @@
|
|||
package pro.taskana.common.rest;
|
||||
|
||||
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.get;
|
||||
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.put;
|
||||
|
||||
import java.util.Map;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
|
||||
import pro.taskana.common.rest.models.CustomAttributesRepresentationModel;
|
||||
import pro.taskana.rest.test.BaseRestDocTest;
|
||||
|
||||
@Disabled
|
||||
class TaskanaEngineControllerRestDocTest extends BaseRestDocTest {
|
||||
|
||||
@Test
|
||||
void getAllDomainsDocTest() throws Exception {
|
||||
mockMvc.perform(get(RestEndpoints.URL_DOMAIN)).andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void getClassificationCategoriesDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(get(RestEndpoints.URL_CLASSIFICATION_CATEGORIES))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void getClassificationTypesDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(get(RestEndpoints.URL_CLASSIFICATION_TYPES))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void getClassificationCategoriesByTypeMapDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(get(RestEndpoints.URL_CLASSIFICATION_CATEGORIES_BY_TYPES))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void getCurrentUserInfoDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(get(RestEndpoints.URL_CURRENT_USER))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void getHistoryProviderIsEnabledDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(get(RestEndpoints.URL_HISTORY_ENABLED))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void getCurrentVersionDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(get(RestEndpoints.URL_VERSION))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void getCustomConfigurationAttributesDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(get(RestEndpoints.URL_CUSTOM_ATTRIBUTES))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void setCustomConfigurationAttributesDocTest() throws Exception {
|
||||
CustomAttributesRepresentationModel customAttributes2 =
|
||||
new CustomAttributesRepresentationModel(
|
||||
Map.of(
|
||||
"filter",
|
||||
"{ \"Tasks with state READY\": { \"state\": [\"READY\"]}, "
|
||||
+ "\"Tasks with state CLAIMED\": {\"state\": [\"CLAIMED\"] }}",
|
||||
"schema",
|
||||
Map.of(
|
||||
"Filter",
|
||||
Map.of(
|
||||
"displayName",
|
||||
"Filter for Task-Priority-Report",
|
||||
"members",
|
||||
Map.of(
|
||||
"filter",
|
||||
Map.of("displayName", "Filter values", "type", "json", "min", "1"))))));
|
||||
|
||||
mockMvc
|
||||
.perform(
|
||||
put(RestEndpoints.URL_CUSTOM_ATTRIBUTES)
|
||||
.content(objectMapper.writeValueAsString(customAttributes2)))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
}
|
|
@ -7,6 +7,7 @@ import static pro.taskana.rest.test.RestHelper.TEMPLATE;
|
|||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.stream.Collectors;
|
||||
import org.assertj.core.api.ThrowableAssert.ThrowingCallable;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -222,4 +223,116 @@ class MonitorControllerIntTest {
|
|||
|
||||
assertThatThrownBy(httpCall).isInstanceOf(BadRequest.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void should_ComputeClassificationCategoryReport() {
|
||||
String url = restHelper.toUrl(RestEndpoints.URL_MONITOR_CLASSIFICATION_CATEGORY_REPORT);
|
||||
HttpEntity<?> auth = new HttpEntity<>(RestHelper.generateHeadersForUser("admin"));
|
||||
|
||||
ResponseEntity<ReportRepresentationModel> response =
|
||||
TEMPLATE.exchange(
|
||||
url,
|
||||
HttpMethod.GET,
|
||||
auth,
|
||||
ParameterizedTypeReference.forType(ReportRepresentationModel.class));
|
||||
|
||||
String[][] descArray = {{"AUTOMATIC"}, {"EXTERN"}, {"MANUAL"}};
|
||||
assertThat(response.getBody()).isNotNull();
|
||||
assertThat(
|
||||
response.getBody().getRows().stream()
|
||||
.map(RowRepresentationModel::getDesc)
|
||||
.collect(Collectors.toList()))
|
||||
.hasSize(3)
|
||||
.containsExactlyInAnyOrder(descArray);
|
||||
}
|
||||
|
||||
@Test
|
||||
void should_ComputeClassificationReport() {
|
||||
String url = restHelper.toUrl(RestEndpoints.URL_MONITOR_CLASSIFICATION_REPORT);
|
||||
HttpEntity<?> auth = new HttpEntity<>(RestHelper.generateHeadersForUser("admin"));
|
||||
|
||||
ResponseEntity<ReportRepresentationModel> response =
|
||||
TEMPLATE.exchange(
|
||||
url,
|
||||
HttpMethod.GET,
|
||||
auth,
|
||||
ParameterizedTypeReference.forType(ReportRepresentationModel.class));
|
||||
|
||||
assertThat(response.getBody()).isNotNull();
|
||||
assertThat(
|
||||
response.getBody().getRows().stream()
|
||||
.map(RowRepresentationModel::getDesc)
|
||||
.collect(Collectors.toList()))
|
||||
.hasSize(6);
|
||||
}
|
||||
|
||||
@Test
|
||||
void should_ComputeDetailedClassificationReport() {
|
||||
String url = restHelper.toUrl(RestEndpoints.URL_MONITOR_DETAILED_CLASSIFICATION_REPORT);
|
||||
HttpEntity<?> auth = new HttpEntity<>(RestHelper.generateHeadersForUser("admin"));
|
||||
|
||||
ResponseEntity<ReportRepresentationModel> response =
|
||||
TEMPLATE.exchange(
|
||||
url,
|
||||
HttpMethod.GET,
|
||||
auth,
|
||||
ParameterizedTypeReference.forType(ReportRepresentationModel.class));
|
||||
|
||||
assertThat(response.getBody()).isNotNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
void should_ComputeTaskStatusReport() {
|
||||
String url = restHelper.toUrl(RestEndpoints.URL_MONITOR_TASK_STATUS_REPORT);
|
||||
HttpEntity<?> auth = new HttpEntity<>(RestHelper.generateHeadersForUser("admin"));
|
||||
|
||||
ResponseEntity<ReportRepresentationModel> response =
|
||||
TEMPLATE.exchange(
|
||||
url,
|
||||
HttpMethod.GET,
|
||||
auth,
|
||||
ParameterizedTypeReference.forType(ReportRepresentationModel.class));
|
||||
|
||||
assertThat(response.getBody()).isNotNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
void should_ComputeTimestampReport() {
|
||||
String url = restHelper.toUrl(RestEndpoints.URL_MONITOR_TIMESTAMP_REPORT);
|
||||
HttpEntity<?> auth = new HttpEntity<>(RestHelper.generateHeadersForUser("admin"));
|
||||
|
||||
ResponseEntity<ReportRepresentationModel> response =
|
||||
TEMPLATE.exchange(
|
||||
url,
|
||||
HttpMethod.GET,
|
||||
auth,
|
||||
ParameterizedTypeReference.forType(ReportRepresentationModel.class));
|
||||
|
||||
assertThat(response.getBody()).isNotNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
void should_ComputeTaskCustomFieldValueReport() {
|
||||
String url =
|
||||
restHelper.toUrl(
|
||||
RestEndpoints.URL_MONITOR_TASK_CUSTOM_FIELD_VALUE_REPORT + "?custom-field=CUSTOM_14");
|
||||
HttpEntity<?> auth = new HttpEntity<>(RestHelper.generateHeadersForUser("admin"));
|
||||
|
||||
ResponseEntity<ReportRepresentationModel> response =
|
||||
TEMPLATE.exchange(
|
||||
url,
|
||||
HttpMethod.GET,
|
||||
auth,
|
||||
ParameterizedTypeReference.forType(ReportRepresentationModel.class));
|
||||
|
||||
String[][] descArray = {{"abc"}, {"dde"}, {"ert"}};
|
||||
|
||||
assertThat(response.getBody()).isNotNull();
|
||||
assertThat(
|
||||
response.getBody().getRows().stream()
|
||||
.map(RowRepresentationModel::getDesc)
|
||||
.collect(Collectors.toList()))
|
||||
.hasSize(3)
|
||||
.containsExactlyInAnyOrder(descArray);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,76 +0,0 @@
|
|||
package pro.taskana.monitor.rest;
|
||||
|
||||
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.get;
|
||||
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
|
||||
import pro.taskana.common.rest.RestEndpoints;
|
||||
import pro.taskana.rest.test.BaseRestDocTest;
|
||||
|
||||
@Disabled
|
||||
class MonitorControllerRestDocTest extends BaseRestDocTest {
|
||||
|
||||
@Test
|
||||
void computeWorkbasketReportDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(
|
||||
get(
|
||||
RestEndpoints.URL_MONITOR_WORKBASKET_REPORT
|
||||
+ "?state=READY&state=CLAIMED&state=COMPLETED"))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void computeWorkbasketPriorityReportDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(
|
||||
get(RestEndpoints.URL_MONITOR_WORKBASKET_PRIORITY_REPORT + "?workbasket-type=GROUP"))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void computeClassificationCategoryReportDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(get(RestEndpoints.URL_MONITOR_CLASSIFICATION_CATEGORY_REPORT))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void computeClassificationReportDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(get(RestEndpoints.URL_MONITOR_CLASSIFICATION_REPORT))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void computeDetailedClassificationReportDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(get(RestEndpoints.URL_MONITOR_DETAILED_CLASSIFICATION_REPORT))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void computeTaskCustomFieldValueReportDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(
|
||||
get(
|
||||
RestEndpoints.URL_MONITOR_TASK_CUSTOM_FIELD_VALUE_REPORT
|
||||
+ "?custom-field=CUSTOM_14"))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void computeTaskStatusReportDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(get(RestEndpoints.URL_MONITOR_TASK_STATUS_REPORT))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void computeTimestampReportDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(get(RestEndpoints.URL_MONITOR_TIMESTAMP_REPORT))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
}
|
|
@ -39,6 +39,23 @@ class TaskCommentControllerIntTest {
|
|||
this.restHelper = restHelper;
|
||||
}
|
||||
|
||||
@Test
|
||||
void should_ReturnTaskComment_When_GivenTaskCommentId() {
|
||||
String url =
|
||||
restHelper.toUrl(
|
||||
RestEndpoints.URL_TASK_COMMENT, "TCI:000000000000000000000000000000000000");
|
||||
HttpEntity<Object> auth = new HttpEntity<>(RestHelper.generateHeadersForUser("admin"));
|
||||
|
||||
ResponseEntity<TaskCommentRepresentationModel> response =
|
||||
TEMPLATE.exchange(
|
||||
url,
|
||||
HttpMethod.GET,
|
||||
auth,
|
||||
ParameterizedTypeReference.forType(TaskCommentRepresentationModel.class));
|
||||
|
||||
assertThat(response.getBody()).isNotNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
void should_FailToReturnTaskComment_When_TaskCommentIsNotExisting() {
|
||||
String url = restHelper.toUrl(RestEndpoints.URL_TASK_COMMENT, "Non existing task comment Id");
|
||||
|
@ -161,6 +178,37 @@ class TaskCommentControllerIntTest {
|
|||
.isEqualTo(HttpStatus.FORBIDDEN);
|
||||
}
|
||||
|
||||
@Test
|
||||
void should_CreateTaskComment_When_TaskIsVisible() {
|
||||
TaskCommentRepresentationModel taskCommentRepresentationModelToCreate =
|
||||
new TaskCommentRepresentationModel();
|
||||
taskCommentRepresentationModelToCreate.setTaskId("TKI:000000000000000000000000000000000004");
|
||||
taskCommentRepresentationModelToCreate.setTextField("newly created task comment");
|
||||
String url =
|
||||
restHelper.toUrl(
|
||||
RestEndpoints.URL_TASK_COMMENTS, "TKI:000000000000000000000000000000000004");
|
||||
HttpEntity<TaskCommentRepresentationModel> auth =
|
||||
new HttpEntity<>(
|
||||
taskCommentRepresentationModelToCreate, RestHelper.generateHeadersForUser("admin"));
|
||||
|
||||
ResponseEntity<TaskCommentRepresentationModel> response =
|
||||
TEMPLATE.exchange(
|
||||
url,
|
||||
HttpMethod.POST,
|
||||
auth,
|
||||
ParameterizedTypeReference.forType(TaskCommentRepresentationModel.class));
|
||||
|
||||
assertThat(response.getBody()).isNotNull();
|
||||
assertThat(response.getBody().getTaskCommentId()).isNotNull();
|
||||
assertThat(response.getBody().getCreator()).isEqualTo("admin");
|
||||
assertThat(response.getBody().getTaskId())
|
||||
.isEqualTo("TKI:000000000000000000000000000000000004");
|
||||
assertThat(response.getBody().getTextField()).isEqualTo("newly created task comment");
|
||||
assertThat(response.getBody().getCreated()).isNotNull();
|
||||
assertThat(response.getBody().getModified()).isNotNull();
|
||||
assertThat(response.getBody().getLink(IanaLinkRelations.SELF)).isNotNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
void should_FailToCreateTaskComment_When_TaskIsNotVisible() {
|
||||
TaskCommentRepresentationModel taskCommentRepresentationModelToCreate =
|
||||
|
@ -207,6 +255,32 @@ class TaskCommentControllerIntTest {
|
|||
.isEqualTo(HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
@Test
|
||||
void should_UpdateTaskComment() {
|
||||
String url =
|
||||
restHelper.toUrl(
|
||||
RestEndpoints.URL_TASK_COMMENT, "TCI:000000000000000000000000000000000003");
|
||||
HttpEntity<Object> auth = new HttpEntity<>(RestHelper.generateHeadersForUser("admin"));
|
||||
|
||||
ResponseEntity<TaskCommentRepresentationModel> getTaskCommentResponse =
|
||||
TEMPLATE.exchange(url, HttpMethod.GET, auth, TASK_COMMENT_TYPE);
|
||||
TaskCommentRepresentationModel taskCommentToUpdate = getTaskCommentResponse.getBody();
|
||||
assertThat(taskCommentToUpdate).isNotNull();
|
||||
assertThat(taskCommentToUpdate.getLink(IanaLinkRelations.SELF)).isNotNull();
|
||||
assertThat(taskCommentToUpdate.getCreator()).isEqualTo("user-1-2");
|
||||
assertThat(taskCommentToUpdate.getTextField()).isEqualTo("some text in textfield");
|
||||
|
||||
taskCommentToUpdate.setTextField("updated text in textfield");
|
||||
HttpEntity<TaskCommentRepresentationModel> auth2 =
|
||||
new HttpEntity<>(taskCommentToUpdate, RestHelper.generateHeadersForUser("admin"));
|
||||
|
||||
ResponseEntity<TaskCommentRepresentationModel> responseUpdate =
|
||||
TEMPLATE.exchange(url, HttpMethod.PUT, auth2, TASK_COMMENT_TYPE);
|
||||
|
||||
assertThat(responseUpdate.getBody()).isNotNull();
|
||||
assertThat(responseUpdate.getBody().getTextField()).isEqualTo("updated text in textfield");
|
||||
}
|
||||
|
||||
@Test
|
||||
void should_FailToUpdateTaskComment_When_TaskCommentWasModifiedConcurrently() {
|
||||
String url =
|
||||
|
@ -297,6 +371,33 @@ class TaskCommentControllerIntTest {
|
|||
.isEqualTo(HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
|
||||
@Test
|
||||
void should_DeleteTaskComment_When_UserHasAuthorization() {
|
||||
String url =
|
||||
restHelper.toUrl(
|
||||
RestEndpoints.URL_TASK_COMMENT, "TCI:000000000000000000000000000000000006");
|
||||
HttpEntity<Object> auth = new HttpEntity<>(RestHelper.generateHeadersForUser("admin"));
|
||||
|
||||
ResponseEntity<TaskCommentRepresentationModel> response =
|
||||
TEMPLATE.exchange(
|
||||
url,
|
||||
HttpMethod.DELETE,
|
||||
auth,
|
||||
ParameterizedTypeReference.forType(TaskCommentRepresentationModel.class));
|
||||
|
||||
assertThat(response.getStatusCode()).isEqualTo(HttpStatus.NO_CONTENT);
|
||||
|
||||
ThrowingCallable httpCall =
|
||||
() -> TEMPLATE.exchange(url, HttpMethod.GET, auth, TASK_COMMENT_TYPE);
|
||||
|
||||
assertThatThrownBy(httpCall)
|
||||
.isInstanceOf(HttpStatusCodeException.class)
|
||||
.hasMessageContaining("TASK_COMMENT_NOT_FOUND")
|
||||
.extracting(HttpStatusCodeException.class::cast)
|
||||
.extracting(HttpStatusCodeException::getStatusCode)
|
||||
.isEqualTo(HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
@Test
|
||||
void should_FailToDeleteTaskComment_When_UserHasNoAuthorization() {
|
||||
String url =
|
||||
|
|
|
@ -1,76 +0,0 @@
|
|||
package pro.taskana.task.rest;
|
||||
|
||||
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.delete;
|
||||
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.get;
|
||||
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.post;
|
||||
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.put;
|
||||
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
|
||||
import pro.taskana.common.rest.RestEndpoints;
|
||||
import pro.taskana.rest.test.BaseRestDocTest;
|
||||
import pro.taskana.task.api.TaskService;
|
||||
import pro.taskana.task.api.models.TaskComment;
|
||||
import pro.taskana.task.rest.assembler.TaskCommentRepresentationModelAssembler;
|
||||
import pro.taskana.task.rest.models.TaskCommentRepresentationModel;
|
||||
import pro.taskana.testapi.security.JaasExtension;
|
||||
import pro.taskana.testapi.security.WithAccessId;
|
||||
|
||||
@Disabled
|
||||
@ExtendWith(JaasExtension.class)
|
||||
class TaskCommentControllerRestDocTest extends BaseRestDocTest {
|
||||
|
||||
@Autowired TaskCommentRepresentationModelAssembler assembler;
|
||||
@Autowired TaskService taskService;
|
||||
|
||||
@Test
|
||||
void getAllTaskCommentsForSpecificTaskDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(get(RestEndpoints.URL_TASK_COMMENTS, "TKI:000000000000000000000000000000000000"))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void getSpecificTaskCommentDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(get(RestEndpoints.URL_TASK_COMMENT, "TCI:000000000000000000000000000000000000"))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@WithAccessId(user = "admin")
|
||||
@Test
|
||||
void updateTaskCommentDocTest() throws Exception {
|
||||
TaskComment comment = taskService.getTaskComment("TCI:000000000000000000000000000000000000");
|
||||
comment.setTextField("updated text in textfield");
|
||||
TaskCommentRepresentationModel repModel = assembler.toModel(comment);
|
||||
|
||||
mockMvc
|
||||
.perform(
|
||||
put(RestEndpoints.URL_TASK_COMMENT, "TCI:000000000000000000000000000000000000")
|
||||
.content(objectMapper.writeValueAsString(repModel)))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void createTaskCommentDocTest() throws Exception {
|
||||
TaskComment comment = taskService.newTaskComment("TKI:000000000000000000000000000000000000");
|
||||
comment.setTextField("some text in textfield");
|
||||
TaskCommentRepresentationModel repModel = assembler.toModel(comment);
|
||||
mockMvc
|
||||
.perform(
|
||||
post(RestEndpoints.URL_TASK_COMMENTS, comment.getTaskId())
|
||||
.content(objectMapper.writeValueAsBytes(repModel)))
|
||||
.andExpect(MockMvcResultMatchers.status().isCreated());
|
||||
}
|
||||
|
||||
@WithAccessId(user = "admin")
|
||||
@Test
|
||||
void deleteTaskCommentDocTest() throws Exception {
|
||||
this.mockMvc
|
||||
.perform(delete(RestEndpoints.URL_TASK_COMMENT, "TCI:000000000000000000000000000000000001"))
|
||||
.andExpect(MockMvcResultMatchers.status().isNoContent());
|
||||
}
|
||||
}
|
|
@ -2315,6 +2315,23 @@ class TaskControllerIntTest {
|
|||
assertThat(claimedTaskRepresentationModel.getOwner()).isEqualTo("user-1-1");
|
||||
assertThat(claimedTaskRepresentationModel.getState()).isEqualTo(TaskState.CLAIMED);
|
||||
}
|
||||
|
||||
@Test
|
||||
void should_SelectAndClaimTasks() {
|
||||
String url = restHelper.toUrl(RestEndpoints.URL_TASKS_ID_SELECT_AND_CLAIM + "?custom14=abc");
|
||||
HttpEntity<Object> auth = new HttpEntity<>(RestHelper.generateHeadersForUser("admin"));
|
||||
|
||||
ResponseEntity<TaskRepresentationModel> response =
|
||||
TEMPLATE.exchange(url, HttpMethod.POST, auth, TASK_MODEL_TYPE);
|
||||
|
||||
assertThat(response.getBody()).isNotNull();
|
||||
|
||||
String url2 = restHelper.toUrl(RestEndpoints.URL_TASKS_ID, response.getBody().getTaskId());
|
||||
ResponseEntity<TaskRepresentationModel> responseGetTask =
|
||||
TEMPLATE.exchange(url2, HttpMethod.GET, auth, TASK_MODEL_TYPE);
|
||||
assertThat(responseGetTask).isNotNull();
|
||||
assertThat(responseGetTask.getBody().getOwner()).isEqualTo("admin");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
|
|
|
@ -1,249 +0,0 @@
|
|||
package pro.taskana.task.rest;
|
||||
|
||||
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.delete;
|
||||
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.get;
|
||||
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.post;
|
||||
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.put;
|
||||
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
|
||||
import pro.taskana.common.rest.RestEndpoints;
|
||||
import pro.taskana.rest.test.BaseRestDocTest;
|
||||
import pro.taskana.rest.test.RestHelper;
|
||||
import pro.taskana.task.api.TaskService;
|
||||
import pro.taskana.task.api.models.Task;
|
||||
import pro.taskana.task.internal.models.ObjectReferenceImpl;
|
||||
import pro.taskana.task.rest.assembler.TaskRepresentationModelAssembler;
|
||||
import pro.taskana.task.rest.models.IsReadRepresentationModel;
|
||||
import pro.taskana.task.rest.models.TaskRepresentationModel;
|
||||
import pro.taskana.testapi.security.JaasExtension;
|
||||
import pro.taskana.testapi.security.WithAccessId;
|
||||
|
||||
@Disabled
|
||||
@ExtendWith(JaasExtension.class)
|
||||
class TaskControllerRestDocTest extends BaseRestDocTest {
|
||||
|
||||
@Autowired TaskService taskService;
|
||||
@Autowired TaskRepresentationModelAssembler assembler;
|
||||
|
||||
@Test
|
||||
void getAllTasksDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(get(RestEndpoints.URL_TASKS + "?por-type=VNR&por-value=22334455&sort-by=NAME"))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void deleteTaskDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(delete(RestEndpoints.URL_TASKS_ID, "TKI:000000000000000000000000000000000039"))
|
||||
.andExpect(MockMvcResultMatchers.status().isNoContent());
|
||||
}
|
||||
|
||||
@Test
|
||||
void forceDeleteTaskDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(
|
||||
delete(RestEndpoints.URL_TASKS_ID_FORCE, "TKI:000000000000000000000000000000000005"))
|
||||
.andExpect(MockMvcResultMatchers.status().isNoContent());
|
||||
}
|
||||
|
||||
@Test
|
||||
void deleteTasksDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(
|
||||
delete(
|
||||
RestEndpoints.URL_TASKS
|
||||
+ "?task-id=TKI:000000000000000000000000000000000036"
|
||||
+ "&task-id=TKI:000000000000000000000000000000000037"
|
||||
+ "&task-id=TKI:000000000000000000000000000000000038"))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void getSpecificTaskDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(get(RestEndpoints.URL_TASKS_ID, "TKI:100000000000000000000000000000000000"))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void claimTaskDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(post(RestEndpoints.URL_TASKS_ID_CLAIM, "TKI:000000000000000000000000000000000003"))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void forceClaimTaskDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(
|
||||
post(
|
||||
RestEndpoints.URL_TASKS_ID_CLAIM_FORCE, "TKI:000000000000000000000000000000000003"))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void cancelClaimTaskDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(
|
||||
delete(RestEndpoints.URL_TASKS_ID_CLAIM, "TKI:000000000000000000000000000000000002")
|
||||
.headers(RestHelper.generateHeadersForUser("user-1-1")))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void forceCancelClaimTaskDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(
|
||||
delete(
|
||||
RestEndpoints.URL_TASKS_ID_CLAIM_FORCE,
|
||||
"TKI:000000000000000000000000000000000035")
|
||||
.headers(RestHelper.generateHeadersForUser("user-1-2")))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void requestReviewTaskDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(
|
||||
post(
|
||||
RestEndpoints.URL_TASKS_ID_REQUEST_REVIEW,
|
||||
"TKI:000000000000000000000000000000000032")
|
||||
.headers(RestHelper.generateHeadersForUser("user-1-2")))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void forceRequestReviewTaskDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(
|
||||
post(
|
||||
RestEndpoints.URL_TASKS_ID_REQUEST_REVIEW_FORCE,
|
||||
"TKI:000000000000000000000000000000000101")
|
||||
.headers(RestHelper.generateHeadersForUser("user-1-2")))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void requestChangesTaskDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(
|
||||
post(
|
||||
RestEndpoints.URL_TASKS_ID_REQUEST_CHANGES,
|
||||
"TKI:000000000000000000000000000000000136")
|
||||
.headers(RestHelper.generateHeadersForUser("user-1-1")))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void forceRequestChangesTaskDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(
|
||||
post(
|
||||
RestEndpoints.URL_TASKS_ID_REQUEST_CHANGES_FORCE,
|
||||
"TKI:000000000000000000000000000000000100")
|
||||
.headers(RestHelper.generateHeadersForUser("user-1-1")))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void selectAndClaimTaskDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(post(RestEndpoints.URL_TASKS_ID_SELECT_AND_CLAIM + "?custom14=abc"))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void completeTaskDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(
|
||||
post(RestEndpoints.URL_TASKS_ID_COMPLETE, "TKI:000000000000000000000000000000000003"))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void forceCompleteTaskDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(
|
||||
post(
|
||||
RestEndpoints.URL_TASKS_ID_COMPLETE_FORCE,
|
||||
"TKI:000000000000000000000000000000000003"))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void cancelTaskDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(
|
||||
post(RestEndpoints.URL_TASKS_ID_CANCEL, "TKI:000000000000000000000000000000000026"))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void terminateTaskDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(
|
||||
post(RestEndpoints.URL_TASKS_ID_TERMINATE, "TKI:000000000000000000000000000000000000"))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void setTaskReadDocTest() throws Exception {
|
||||
|
||||
IsReadRepresentationModel isRead = new IsReadRepresentationModel(true);
|
||||
|
||||
mockMvc
|
||||
.perform(
|
||||
post(RestEndpoints.URL_TASKS_ID_SET_READ, "TKI:000000000000000000000000000000000025")
|
||||
.content(objectMapper.writeValueAsString(isRead)))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void createTaskDocTest() throws Exception {
|
||||
final Task task = taskService.newTask("WBI:100000000000000000000000000000000004");
|
||||
ObjectReferenceImpl objectReference = new ObjectReferenceImpl();
|
||||
objectReference.setCompany("MyCompany1");
|
||||
objectReference.setSystem("MySystem1");
|
||||
objectReference.setSystemInstance("MyInstance1");
|
||||
objectReference.setType("MyType1");
|
||||
objectReference.setValue("00000001");
|
||||
task.setPrimaryObjRef(objectReference);
|
||||
task.setClassificationKey("L11010");
|
||||
task.addSecondaryObjectReference("company", "system", "systemInstance", "type", "value");
|
||||
TaskRepresentationModel repModel = assembler.toModel(task);
|
||||
mockMvc
|
||||
.perform(post(RestEndpoints.URL_TASKS).content(objectMapper.writeValueAsString(repModel)))
|
||||
.andExpect(MockMvcResultMatchers.status().isCreated());
|
||||
}
|
||||
|
||||
@Test
|
||||
void transferTaskDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(
|
||||
post(
|
||||
RestEndpoints.URL_TASKS_ID_TRANSFER_WORKBASKET_ID,
|
||||
"TKI:000000000000000000000000000000000004",
|
||||
"WBI:100000000000000000000000000000000001"))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@WithAccessId(user = "admin")
|
||||
@Test
|
||||
void updateTaskDocTest() throws Exception {
|
||||
Task task = taskService.getTask("TKI:000000000000000000000000000000000003");
|
||||
task.setDescription("new description");
|
||||
|
||||
TaskRepresentationModel repModel = assembler.toModel(task);
|
||||
|
||||
mockMvc
|
||||
.perform(
|
||||
put(RestEndpoints.URL_TASKS_ID, task.getId())
|
||||
.content(objectMapper.writeValueAsString(repModel)))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
}
|
|
@ -1,70 +0,0 @@
|
|||
package pro.taskana.user.rest;
|
||||
|
||||
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.delete;
|
||||
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.get;
|
||||
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.post;
|
||||
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.put;
|
||||
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
|
||||
import pro.taskana.common.rest.RestEndpoints;
|
||||
import pro.taskana.rest.test.BaseRestDocTest;
|
||||
import pro.taskana.user.api.UserService;
|
||||
import pro.taskana.user.api.models.User;
|
||||
import pro.taskana.user.rest.assembler.UserRepresentationModelAssembler;
|
||||
import pro.taskana.user.rest.models.UserRepresentationModel;
|
||||
|
||||
@Disabled
|
||||
class UserControllerRestDocTest extends BaseRestDocTest {
|
||||
@Autowired UserRepresentationModelAssembler assembler;
|
||||
@Autowired UserService userService;
|
||||
|
||||
@Test
|
||||
void getUserDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(get(RestEndpoints.URL_USERS_ID, "teamlead-1"))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void getUsersDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(get(RestEndpoints.URL_USERS + "?user-id=teamlead-1&user-id=user-1-1"))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void createUserDocTest() throws Exception {
|
||||
User user = userService.newUser();
|
||||
user.setId("user-10-2");
|
||||
user.setFirstName("Hans");
|
||||
user.setLastName("Georg");
|
||||
UserRepresentationModel repModel = assembler.toModel(user);
|
||||
|
||||
mockMvc
|
||||
.perform(post(RestEndpoints.URL_USERS).content(objectMapper.writeValueAsString(repModel)))
|
||||
.andExpect(MockMvcResultMatchers.status().isCreated());
|
||||
}
|
||||
|
||||
@Test
|
||||
void updateUserDocTest() throws Exception {
|
||||
User user = userService.getUser("teamlead-1");
|
||||
user.setFirstName("new name");
|
||||
UserRepresentationModel repModel = assembler.toModel(user);
|
||||
|
||||
mockMvc
|
||||
.perform(
|
||||
put(RestEndpoints.URL_USERS_ID, "teamlead-1")
|
||||
.content(objectMapper.writeValueAsString(repModel)))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void deleteUserDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(delete(RestEndpoints.URL_USERS_ID, "user-1-1"))
|
||||
.andExpect(MockMvcResultMatchers.status().isNoContent());
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
package pro.taskana.workbasket.rest;
|
||||
|
||||
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.delete;
|
||||
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.get;
|
||||
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
|
||||
import pro.taskana.common.rest.RestEndpoints;
|
||||
import pro.taskana.rest.test.BaseRestDocTest;
|
||||
|
||||
@Disabled
|
||||
class WorkbasketAccessItemControllerRestDocTest extends BaseRestDocTest {
|
||||
|
||||
@Test
|
||||
void getWorkbasketAccessItemsDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(
|
||||
get(
|
||||
RestEndpoints.URL_WORKBASKET_ACCESS_ITEMS
|
||||
+ "?sort-by=WORKBASKET_KEY&order=ASCENDING&access-id=user-2-2"))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void removeWorkbasketAccessItemsDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(delete(RestEndpoints.URL_WORKBASKET_ACCESS_ITEMS + "?access-id=user-2-1"))
|
||||
.andExpect(MockMvcResultMatchers.status().isNoContent());
|
||||
}
|
||||
}
|
|
@ -7,6 +7,10 @@ import static pro.taskana.rest.test.RestHelper.TEMPLATE;
|
|||
import java.net.URLDecoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.time.Instant;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import org.assertj.core.api.ThrowableAssert.ThrowingCallable;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -25,6 +29,7 @@ import pro.taskana.rest.test.TaskanaSpringBootTest;
|
|||
import pro.taskana.workbasket.api.WorkbasketType;
|
||||
import pro.taskana.workbasket.rest.models.DistributionTargetsCollectionRepresentationModel;
|
||||
import pro.taskana.workbasket.rest.models.WorkbasketAccessItemCollectionRepresentationModel;
|
||||
import pro.taskana.workbasket.rest.models.WorkbasketAccessItemRepresentationModel;
|
||||
import pro.taskana.workbasket.rest.models.WorkbasketRepresentationModel;
|
||||
import pro.taskana.workbasket.rest.models.WorkbasketSummaryPagedRepresentationModel;
|
||||
import pro.taskana.workbasket.rest.models.WorkbasketSummaryRepresentationModel;
|
||||
|
@ -175,6 +180,37 @@ class WorkbasketControllerIntTest {
|
|||
.isEqualTo(HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
@Test
|
||||
void should_UpdateWorkbasket() {
|
||||
String url =
|
||||
restHelper.toUrl(
|
||||
RestEndpoints.URL_WORKBASKET_ID, "WBI:100000000000000000000000000000000001");
|
||||
HttpEntity<Object> auth = new HttpEntity<>(RestHelper.generateHeadersForUser("admin"));
|
||||
|
||||
ResponseEntity<WorkbasketRepresentationModel> response =
|
||||
TEMPLATE.exchange(
|
||||
URLDecoder.decode(url, StandardCharsets.UTF_8),
|
||||
HttpMethod.GET,
|
||||
auth,
|
||||
ParameterizedTypeReference.forType(WorkbasketRepresentationModel.class));
|
||||
|
||||
assertThat(response.getBody()).isNotNull();
|
||||
WorkbasketRepresentationModel workbasketToUpdate = response.getBody();
|
||||
workbasketToUpdate.setName("new name");
|
||||
|
||||
HttpEntity<WorkbasketRepresentationModel> httpEntity =
|
||||
new HttpEntity<>(workbasketToUpdate, RestHelper.generateHeadersForUser("admin"));
|
||||
ResponseEntity<WorkbasketRepresentationModel> responseUpdate =
|
||||
TEMPLATE.exchange(
|
||||
url,
|
||||
HttpMethod.PUT,
|
||||
httpEntity,
|
||||
ParameterizedTypeReference.forType(WorkbasketRepresentationModel.class));
|
||||
|
||||
assertThat(responseUpdate.getBody()).isNotNull();
|
||||
assertThat(responseUpdate.getBody().getName()).isEqualTo("new name");
|
||||
}
|
||||
|
||||
@Test
|
||||
void testGetSecondPageSortedByKey() {
|
||||
String parameters = "?sort-by=KEY&order=DESCENDING&page-size=5&page=2";
|
||||
|
@ -280,6 +316,53 @@ class WorkbasketControllerIntTest {
|
|||
assertThat(response.getBody().getContent()).hasSize(4);
|
||||
}
|
||||
|
||||
@Test
|
||||
void should_SetWorkbasketAccessItemsForAWorkbasket() {
|
||||
String workbasketId = "WBI:000000000000000000000000000000000900";
|
||||
String url = restHelper.toUrl(RestEndpoints.URL_WORKBASKET_ID_ACCESS_ITEMS, workbasketId);
|
||||
WorkbasketAccessItemRepresentationModel wbAccessItem =
|
||||
new WorkbasketAccessItemRepresentationModel();
|
||||
wbAccessItem.setWorkbasketId(workbasketId);
|
||||
wbAccessItem.setAccessId("new-access-id");
|
||||
wbAccessItem.setAccessName("new-access-name");
|
||||
wbAccessItem.setPermOpen(true);
|
||||
|
||||
WorkbasketAccessItemCollectionRepresentationModel repModel =
|
||||
new WorkbasketAccessItemCollectionRepresentationModel(List.of(wbAccessItem));
|
||||
|
||||
HttpEntity<WorkbasketAccessItemCollectionRepresentationModel> auth =
|
||||
new HttpEntity<>(repModel, RestHelper.generateHeadersForUser("admin"));
|
||||
|
||||
ResponseEntity<WorkbasketAccessItemCollectionRepresentationModel> response =
|
||||
TEMPLATE.exchange(
|
||||
url,
|
||||
HttpMethod.PUT,
|
||||
auth,
|
||||
ParameterizedTypeReference.forType(
|
||||
WorkbasketAccessItemCollectionRepresentationModel.class));
|
||||
|
||||
assertThat(response.getBody()).isNotNull();
|
||||
|
||||
ResponseEntity<WorkbasketAccessItemCollectionRepresentationModel> responseGetAccessItems =
|
||||
TEMPLATE.exchange(
|
||||
url,
|
||||
HttpMethod.GET,
|
||||
auth,
|
||||
ParameterizedTypeReference.forType(
|
||||
WorkbasketAccessItemCollectionRepresentationModel.class));
|
||||
|
||||
assertThat(responseGetAccessItems.getBody()).isNotNull();
|
||||
assertThat(responseGetAccessItems.getBody().getContent()).hasSize(1);
|
||||
Collection<WorkbasketAccessItemRepresentationModel> collection =
|
||||
responseGetAccessItems.getBody().getContent();
|
||||
Iterator<WorkbasketAccessItemRepresentationModel> iterator = collection.iterator();
|
||||
WorkbasketAccessItemRepresentationModel returnedWbAccessItem = iterator.next();
|
||||
assertThat(returnedWbAccessItem.getWorkbasketId()).isEqualTo(workbasketId);
|
||||
assertThat(returnedWbAccessItem.getAccessId()).isEqualTo("new-access-id");
|
||||
assertThat(returnedWbAccessItem.getAccessName()).isEqualTo("new-access-name");
|
||||
assertThat(returnedWbAccessItem.isPermOpen()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
void testGetWorkbasketDistributionTargets() {
|
||||
String url =
|
||||
|
@ -302,6 +385,46 @@ class WorkbasketControllerIntTest {
|
|||
assertThat(response.getBody().getContent()).hasSize(4);
|
||||
}
|
||||
|
||||
@Test
|
||||
void should_SetAllDistributionTargets() {
|
||||
List<String> distributionTargets =
|
||||
List.of(
|
||||
"WBI:100000000000000000000000000000000003", "WBI:100000000000000000000000000000000004");
|
||||
String url =
|
||||
restHelper.toUrl(
|
||||
RestEndpoints.URL_WORKBASKET_ID_DISTRIBUTION,
|
||||
"WBI:100000000000000000000000000000000002");
|
||||
|
||||
HttpEntity<Object> auth =
|
||||
new HttpEntity<>(distributionTargets, RestHelper.generateHeadersForUser("admin"));
|
||||
ResponseEntity<DistributionTargetsCollectionRepresentationModel> response =
|
||||
TEMPLATE.exchange(
|
||||
url,
|
||||
HttpMethod.PUT,
|
||||
auth,
|
||||
ParameterizedTypeReference.forType(
|
||||
DistributionTargetsCollectionRepresentationModel.class));
|
||||
|
||||
assertThat(response.getBody()).isNotNull();
|
||||
|
||||
ResponseEntity<DistributionTargetsCollectionRepresentationModel>
|
||||
responseGetDistributionTargets =
|
||||
TEMPLATE.exchange(
|
||||
url,
|
||||
HttpMethod.GET,
|
||||
auth,
|
||||
ParameterizedTypeReference.forType(
|
||||
DistributionTargetsCollectionRepresentationModel.class));
|
||||
assertThat(responseGetDistributionTargets.getBody()).isNotNull();
|
||||
assertThat(responseGetDistributionTargets.getBody().getContent()).hasSize(2);
|
||||
assertThat(
|
||||
responseGetDistributionTargets.getBody().getContent().stream()
|
||||
.map(WorkbasketSummaryRepresentationModel::getWorkbasketId)
|
||||
.collect(Collectors.toList()))
|
||||
.containsExactlyInAnyOrder(
|
||||
"WBI:100000000000000000000000000000000003", "WBI:100000000000000000000000000000000004");
|
||||
}
|
||||
|
||||
@Test
|
||||
void should_ThrowException_When_ProvidingInvalidFilterParams() {
|
||||
String url =
|
||||
|
@ -329,4 +452,31 @@ class WorkbasketControllerIntTest {
|
|||
.extracting(HttpStatusCodeException::getStatusCode)
|
||||
.isEqualTo(HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
|
||||
@Test
|
||||
void should_CreateWorkbasket() {
|
||||
String url = restHelper.toUrl(RestEndpoints.URL_WORKBASKET);
|
||||
|
||||
WorkbasketRepresentationModel workbasketToCreate = new WorkbasketRepresentationModel();
|
||||
workbasketToCreate.setKey("newKey");
|
||||
workbasketToCreate.setDomain("DOMAIN_A");
|
||||
workbasketToCreate.setType(WorkbasketType.GROUP);
|
||||
workbasketToCreate.setName("this is a wonderful workbasket name");
|
||||
|
||||
HttpEntity<WorkbasketRepresentationModel> auth =
|
||||
new HttpEntity<>(workbasketToCreate, RestHelper.generateHeadersForUser("admin"));
|
||||
|
||||
ResponseEntity<WorkbasketRepresentationModel> responseCreate =
|
||||
TEMPLATE.exchange(
|
||||
url,
|
||||
HttpMethod.POST,
|
||||
auth,
|
||||
ParameterizedTypeReference.forType(WorkbasketRepresentationModel.class));
|
||||
|
||||
assertThat(responseCreate.getStatusCode()).isEqualTo(HttpStatus.CREATED);
|
||||
assertThat(responseCreate.getBody()).isNotNull();
|
||||
|
||||
String wbIdOfCreatedWb = responseCreate.getBody().getWorkbasketId();
|
||||
assertThat(wbIdOfCreatedWb).startsWith("WBI:");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,153 +0,0 @@
|
|||
package pro.taskana.workbasket.rest;
|
||||
|
||||
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.delete;
|
||||
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.get;
|
||||
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.post;
|
||||
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.put;
|
||||
|
||||
import java.util.List;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
|
||||
import pro.taskana.common.rest.RestEndpoints;
|
||||
import pro.taskana.rest.test.BaseRestDocTest;
|
||||
import pro.taskana.testapi.security.JaasExtension;
|
||||
import pro.taskana.testapi.security.WithAccessId;
|
||||
import pro.taskana.workbasket.api.WorkbasketPermission;
|
||||
import pro.taskana.workbasket.api.WorkbasketService;
|
||||
import pro.taskana.workbasket.api.WorkbasketType;
|
||||
import pro.taskana.workbasket.api.models.Workbasket;
|
||||
import pro.taskana.workbasket.api.models.WorkbasketAccessItem;
|
||||
import pro.taskana.workbasket.rest.assembler.WorkbasketAccessItemRepresentationModelAssembler;
|
||||
import pro.taskana.workbasket.rest.assembler.WorkbasketRepresentationModelAssembler;
|
||||
import pro.taskana.workbasket.rest.models.WorkbasketAccessItemCollectionRepresentationModel;
|
||||
import pro.taskana.workbasket.rest.models.WorkbasketRepresentationModel;
|
||||
|
||||
@Disabled
|
||||
@ExtendWith(JaasExtension.class)
|
||||
class WorkbasketControllerRestDocTest extends BaseRestDocTest {
|
||||
|
||||
@Autowired WorkbasketService workbasketService;
|
||||
@Autowired WorkbasketRepresentationModelAssembler assembler;
|
||||
@Autowired WorkbasketAccessItemRepresentationModelAssembler accessItemAssembler;
|
||||
|
||||
@Test
|
||||
void getAllWorkbasketsDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(get(RestEndpoints.URL_WORKBASKET + "?type=PERSONAL"))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void getSpecificWorkbasketDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(get(RestEndpoints.URL_WORKBASKET_ID, "WBI:100000000000000000000000000000000001"))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void deleteWorkbasketDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(
|
||||
delete(RestEndpoints.URL_WORKBASKET_ID, "WBI:100000000000000000000000000000000002"))
|
||||
.andExpect(MockMvcResultMatchers.status().isNoContent());
|
||||
}
|
||||
|
||||
@Test
|
||||
void createWorkbasketDocTest() throws Exception {
|
||||
Workbasket workbasket = workbasketService.newWorkbasket("asdasdasd", "DOMAIN_A");
|
||||
workbasket.setType(WorkbasketType.GROUP);
|
||||
workbasket.setName("this is a wonderful workbasket name");
|
||||
|
||||
WorkbasketRepresentationModel repModel = assembler.toModel(workbasket);
|
||||
|
||||
mockMvc
|
||||
.perform(
|
||||
post(RestEndpoints.URL_WORKBASKET).content(objectMapper.writeValueAsString(repModel)))
|
||||
.andExpect(MockMvcResultMatchers.status().isCreated());
|
||||
}
|
||||
|
||||
@Test
|
||||
@WithAccessId(user = "admin")
|
||||
void updateWorkbasketDocTest() throws Exception {
|
||||
|
||||
Workbasket workbasket =
|
||||
workbasketService.getWorkbasket("WBI:100000000000000000000000000000000003");
|
||||
workbasket.setName("new name");
|
||||
|
||||
WorkbasketRepresentationModel repModel = assembler.toModel(workbasket);
|
||||
|
||||
mockMvc
|
||||
.perform(
|
||||
put(RestEndpoints.URL_WORKBASKET_ID, "WBI:100000000000000000000000000000000003")
|
||||
.content(objectMapper.writeValueAsString(repModel)))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void getAllWorkbasketAccessItemsDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(
|
||||
get(
|
||||
RestEndpoints.URL_WORKBASKET_ID_ACCESS_ITEMS,
|
||||
"WBI:100000000000000000000000000000000001"))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void setAllWorkbasketAccessItemsDocTest() throws Exception {
|
||||
String workbasketId = "WBI:100000000000000000000000000000000001";
|
||||
WorkbasketAccessItem accessItem =
|
||||
workbasketService.newWorkbasketAccessItem(workbasketId, "new-access-id");
|
||||
accessItem.setAccessName("new-access-name");
|
||||
accessItem.setPermission(WorkbasketPermission.OPEN, true);
|
||||
|
||||
WorkbasketAccessItemCollectionRepresentationModel repModel =
|
||||
new WorkbasketAccessItemCollectionRepresentationModel(
|
||||
List.of(accessItemAssembler.toModel(accessItem)));
|
||||
|
||||
mockMvc
|
||||
.perform(
|
||||
put(RestEndpoints.URL_WORKBASKET_ID_ACCESS_ITEMS, workbasketId)
|
||||
.content(objectMapper.writeValueAsString(repModel)))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void getAllWorkbasketDistributionTargetsDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(
|
||||
get(
|
||||
RestEndpoints.URL_WORKBASKET_ID_DISTRIBUTION,
|
||||
"WBI:100000000000000000000000000000000002"))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void setAllDistributionTargetsDocTest() throws Exception {
|
||||
|
||||
List<String> distributionTargets =
|
||||
List.of(
|
||||
"WBI:100000000000000000000000000000000002", "WBI:100000000000000000000000000000000003");
|
||||
|
||||
mockMvc
|
||||
.perform(
|
||||
put(
|
||||
RestEndpoints.URL_WORKBASKET_ID_DISTRIBUTION,
|
||||
"WBI:100000000000000000000000000000000001")
|
||||
.content(objectMapper.writeValueAsString(distributionTargets)))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
void removeWorkbasketAsDistributionTargetDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(
|
||||
delete(
|
||||
RestEndpoints.URL_WORKBASKET_ID_DISTRIBUTION,
|
||||
"WBI:100000000000000000000000000000000007"))
|
||||
.andExpect(MockMvcResultMatchers.status().isNoContent());
|
||||
}
|
||||
}
|
|
@ -1,58 +0,0 @@
|
|||
package pro.taskana.workbasket.rest;
|
||||
|
||||
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.get;
|
||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.multipart;
|
||||
|
||||
import java.util.List;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
|
||||
import pro.taskana.common.rest.RestEndpoints;
|
||||
import pro.taskana.rest.test.BaseRestDocTest;
|
||||
import pro.taskana.testapi.security.JaasExtension;
|
||||
import pro.taskana.testapi.security.WithAccessId;
|
||||
import pro.taskana.workbasket.api.WorkbasketService;
|
||||
import pro.taskana.workbasket.api.WorkbasketType;
|
||||
import pro.taskana.workbasket.internal.models.WorkbasketImpl;
|
||||
import pro.taskana.workbasket.rest.assembler.WorkbasketRepresentationModelAssembler;
|
||||
import pro.taskana.workbasket.rest.models.WorkbasketDefinitionCollectionRepresentationModel;
|
||||
import pro.taskana.workbasket.rest.models.WorkbasketDefinitionRepresentationModel;
|
||||
|
||||
@Disabled
|
||||
@ExtendWith(JaasExtension.class)
|
||||
class WorkbasketDefinitionControllerRestDocTest extends BaseRestDocTest {
|
||||
|
||||
@Autowired WorkbasketService workbasketService;
|
||||
@Autowired WorkbasketRepresentationModelAssembler assembler;
|
||||
|
||||
@Test
|
||||
void exportWorkbasketDefinitionsDocTest() throws Exception {
|
||||
mockMvc
|
||||
.perform(get(RestEndpoints.URL_WORKBASKET_DEFINITIONS))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
|
||||
@Test
|
||||
@WithAccessId(user = "admin")
|
||||
void importWorkbasketDefinitionDocTest() throws Exception {
|
||||
WorkbasketImpl workbasket =
|
||||
(WorkbasketImpl) workbasketService.newWorkbasket("neuerKey", "DOMAIN_A");
|
||||
workbasket.setName("neuer Name");
|
||||
workbasket.setType(WorkbasketType.GROUP);
|
||||
workbasket.setId("gibtsNochNicht");
|
||||
|
||||
WorkbasketDefinitionRepresentationModel repModel =
|
||||
new WorkbasketDefinitionRepresentationModel();
|
||||
repModel.setWorkbasket(assembler.toModel(workbasket));
|
||||
WorkbasketDefinitionCollectionRepresentationModel repModelList =
|
||||
new WorkbasketDefinitionCollectionRepresentationModel(List.of(repModel));
|
||||
|
||||
mockMvc
|
||||
.perform(
|
||||
multipart(RestEndpoints.URL_WORKBASKET_DEFINITIONS)
|
||||
.file("file", objectMapper.writeValueAsBytes(repModelList)))
|
||||
.andExpect(MockMvcResultMatchers.status().isNoContent());
|
||||
}
|
||||
}
|
|
@ -114,11 +114,6 @@
|
|||
<artifactId>spring-security-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.restdocs</groupId>
|
||||
<artifactId>spring-restdocs-mockmvc</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.bytebuddy</groupId>
|
||||
<artifactId>byte-buddy</artifactId>
|
||||
|
|
|
@ -1,90 +0,0 @@
|
|||
<!-- Sourcecode at https://stackoverflow.com/questions/34481638/how-to-use-tocify-with-asciidoctor-for-a-dynamic-toc -->
|
||||
<!-- Generate a nice TOC -->
|
||||
<script src="jquery-1.12.4.min.js"></script>
|
||||
<script src="jquery-ui.min.js"></script>
|
||||
<script src="jquery.tocify.min.js"></script>
|
||||
<!-- We do not need the tocify CSS because the asciidoc CSS already provides most of what we need -->
|
||||
|
||||
<style>
|
||||
.tocify-header {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.tocify-subheader {
|
||||
font-style: normal;
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
.tocify ul {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.tocify-focus {
|
||||
color: #7a2518;
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.tocify-focus > a {
|
||||
color: #7a2518;
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 1750px) {
|
||||
#toc.toc2 {
|
||||
width: 25em;
|
||||
}
|
||||
|
||||
#header, #content, #footer, #footnotes {
|
||||
max-width: 80em;
|
||||
}
|
||||
}
|
||||
|
||||
.sect1:not(#_overview) .sect2 + .sect2 {
|
||||
margin-top: 5em;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
// Add a new container for the tocify toc into the existing toc so we can re-use its
|
||||
// styling
|
||||
$("#toc").append("<div id='generated-toc'></div>");
|
||||
$("#generated-toc").tocify({
|
||||
extendPage: true,
|
||||
context: "#content",
|
||||
highlightOnScroll: true,
|
||||
hideEffect: "slideUp",
|
||||
// Use the IDs that asciidoc already provides so that TOC links and intra-document
|
||||
// links are the same. Anything else might confuse users when they create bookmarks.
|
||||
hashGenerator: function (text, element) {
|
||||
return $(element).attr("id");
|
||||
},
|
||||
// Smooth scrolling doesn't work properly if we use the asciidoc IDs
|
||||
smoothScroll: false,
|
||||
// Set to 'none' to use the tocify classes
|
||||
theme: "none",
|
||||
// Handle book (may contain h1) and article (only h2 deeper)
|
||||
selectors: $("#content").has("h1").size() > 0 ? "h1,h2,h3,h4,h5" : "h2,h3,h4,h5",
|
||||
ignoreSelector: ".discrete"
|
||||
});
|
||||
|
||||
// Switch between static asciidoc toc and dynamic tocify toc based on browser size
|
||||
// This is set to match the media selectors in the asciidoc CSS
|
||||
// Without this, we keep the dynamic toc even if it is moved from the side to preamble
|
||||
// position which will cause odd scrolling behavior
|
||||
const handleTocOnResize = function () {
|
||||
if ($(document).width() < 768) {
|
||||
$("#generated-toc").hide();
|
||||
$(".sectlevel0").show();
|
||||
$(".sectlevel1").show();
|
||||
} else {
|
||||
$("#generated-toc").show();
|
||||
$(".sectlevel0").hide();
|
||||
$(".sectlevel1").hide();
|
||||
}
|
||||
}
|
||||
|
||||
$(window).resize(handleTocOnResize);
|
||||
handleTocOnResize();
|
||||
});
|
||||
</script>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,33 +0,0 @@
|
|||
= TASKANA RESTful API Documentation
|
||||
|
||||
== Overview
|
||||
|
||||
This is the REST documentation for http://taskana.pro)[TASKANA]'s routing REST endpoints.
|
||||
|
||||
*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"}
|
||||
|
||||
=== 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 https://restfulapi.net/hateoas/)[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.
|
||||
|
||||
== DMN routing Upload
|
||||
|
||||
include::{snippets}/DmnUploadControllerRestDocTest/convertAndUploadDocTest/auto-section.adoc[]
|
|
@ -7,13 +7,11 @@ import org.springframework.hateoas.RepresentationModel;
|
|||
public class RoutingUploadResultRepresentationModel
|
||||
extends RepresentationModel<RoutingUploadResultRepresentationModel> {
|
||||
|
||||
/** The total amount of imported rows from the provided excel sheet. */
|
||||
@Schema(
|
||||
name = "amountOfImportedRows",
|
||||
description = "The total amount of imported rows from the provided excel sheet.")
|
||||
protected int amountOfImportedRows;
|
||||
|
||||
/** A human readable String that contains the amount of imported rows. */
|
||||
@Schema(
|
||||
name = "result",
|
||||
description = "A human readable String that contains the amount of imported rows.")
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
package pro.taskana.routing.dmn.rest;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStream;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.mock.web.MockMultipartFile;
|
||||
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
|
||||
import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
|
||||
import pro.taskana.rest.test.BaseRestDocTest;
|
||||
|
||||
@Disabled
|
||||
class DmnUploadControllerRestDocTest extends BaseRestDocTest {
|
||||
|
||||
private static final String EXCEL_NAME = "testExcelRouting.xlsx";
|
||||
private static final String REST_REQUEST_PARAM_NAME = "excelRoutingFile";
|
||||
|
||||
@Test
|
||||
void convertAndUploadDocTest() throws Exception {
|
||||
|
||||
File excelRoutingFile = new ClassPathResource(EXCEL_NAME).getFile();
|
||||
InputStream targetStream = new FileInputStream(excelRoutingFile);
|
||||
|
||||
MockMultipartFile routingMultiPartFile =
|
||||
new MockMultipartFile(REST_REQUEST_PARAM_NAME, targetStream);
|
||||
|
||||
mockMvc
|
||||
.perform(
|
||||
MockMvcRequestBuilders.multipart(RoutingRestEndpoints.URL_ROUTING_RULES_DEFAULT)
|
||||
.file(routingMultiPartFile)
|
||||
.with(
|
||||
request -> {
|
||||
request.setMethod("PUT");
|
||||
return request;
|
||||
}))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk());
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue