TSK-1665: rename the 'object-reference' query parameter into 'por' and add documentation for complex query parameter

This commit is contained in:
ryzheboka 2022-01-11 10:09:23 +01:00 committed by Jörg Heffner
parent ae5774b340
commit fd5b110608
4 changed files with 34 additions and 10 deletions

View File

@ -3,7 +3,13 @@
== Overview == Overview
This is the REST documentation for http://taskana.pro)[TASKANA]'s simplehistory REST endpoints. 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. *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 === Hypermedia Support

View File

@ -4,7 +4,13 @@
This is the REST documentation for http://taskana.pro)[TASKANA] - the world's first open source solution for Enterprise Task Management. 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. *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 === Hypermedia Support

View File

@ -708,9 +708,14 @@ public class TaskQueryFilterParameter implements QueryParameter<TaskQuery, Void>
private final String[] ownerNotLike; private final String[] ownerNotLike;
// endregion // endregion
// region primaryObjectReference // region primaryObjectReference
/** Filter by the primary object reference of the task. This is an exact match. */ /**
@JsonProperty("object-reference") * Filter by the primary object reference of the task. This is an exact match. "por" is a
private final ObjectReference[] objectReferenceIn; * parameter of complex type. Its following attributes from por[].id to por[].value can be
* specified according to the description of complex parameters in the overview, e.g.
* por={"value":"exampleValue"}
*/
@JsonProperty("por")
private final ObjectReference[] primaryObjectReferenceIn;
// endregion // endregion
// region primaryObjectReferenceCompany // region primaryObjectReferenceCompany
/** Filter by the company of the primary object reference of the task. This is an exact match. */ /** Filter by the company of the primary object reference of the task. This is an exact match. */
@ -1501,7 +1506,7 @@ public class TaskQueryFilterParameter implements QueryParameter<TaskQuery, Void>
"owner-not", "owner-not",
"owner-like", "owner-like",
"owner-not-like", "owner-not-like",
"object-reference", "por",
"por.company", "por.company",
"por-company-not", "por-company-not",
"por-company-like", "por-company-like",
@ -1699,7 +1704,7 @@ public class TaskQueryFilterParameter implements QueryParameter<TaskQuery, Void>
String[] ownerNotIn, String[] ownerNotIn,
String[] ownerLike, String[] ownerLike,
String[] ownerNotLike, String[] ownerNotLike,
ObjectReference[] objectReferenceIn, ObjectReference[] primaryObjectReferenceIn,
String[] porCompanyIn, String[] porCompanyIn,
String[] porCompanyNotIn, String[] porCompanyNotIn,
String[] porCompanyLike, String[] porCompanyLike,
@ -1896,7 +1901,7 @@ public class TaskQueryFilterParameter implements QueryParameter<TaskQuery, Void>
this.ownerNotIn = ownerNotIn; this.ownerNotIn = ownerNotIn;
this.ownerLike = ownerLike; this.ownerLike = ownerLike;
this.ownerNotLike = ownerNotLike; this.ownerNotLike = ownerNotLike;
this.objectReferenceIn = objectReferenceIn; this.primaryObjectReferenceIn = primaryObjectReferenceIn;
this.porCompanyIn = porCompanyIn; this.porCompanyIn = porCompanyIn;
this.porCompanyNotIn = porCompanyNotIn; this.porCompanyNotIn = porCompanyNotIn;
this.porCompanyLike = porCompanyLike; this.porCompanyLike = porCompanyLike;
@ -2208,7 +2213,7 @@ public class TaskQueryFilterParameter implements QueryParameter<TaskQuery, Void>
.map(this::wrapElementsInLikeStatement) .map(this::wrapElementsInLikeStatement)
.ifPresent(query::ownerNotLike); .ifPresent(query::ownerNotLike);
Optional.ofNullable(objectReferenceIn).ifPresent(query::primaryObjectReferenceIn); Optional.ofNullable(primaryObjectReferenceIn).ifPresent(query::primaryObjectReferenceIn);
Optional.ofNullable(porCompanyIn).ifPresent(query::primaryObjectReferenceCompanyIn); Optional.ofNullable(porCompanyIn).ifPresent(query::primaryObjectReferenceCompanyIn);
Optional.ofNullable(porCompanyNotIn).ifPresent(query::primaryObjectReferenceCompanyNotIn); Optional.ofNullable(porCompanyNotIn).ifPresent(query::primaryObjectReferenceCompanyNotIn);

View File

@ -4,7 +4,14 @@
This is the REST documentation for http://taskana.pro)[TASKANA]'s routing REST endpoints. 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. *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 === Hypermedia Support