-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): task API enhancement to include attachment/comments info (#…
…4306) * task API response include attachments and comments info * when `withCommentAttachmentInfo` is enabled * additional queries if a attachment/comment is present * count query is not affected related to #2404 --------- Signed-off-by: Kumar Pani, Suman <[email protected]>
- Loading branch information
1 parent
f06cb96
commit ddf039c
Showing
20 changed files
with
407 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...s/models/org/camunda/bpm/engine/rest/dto/runtime/task/TaskWithAttachmentAndCommentDto.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<#macro dto_macro docsUrl=""> | ||
<@lib.dto | ||
extends = "TaskDto" > | ||
|
||
<@lib.property | ||
name = "attachment" | ||
type = "boolean" | ||
desc = "Specifies if an attachment exists for the task." /> | ||
|
||
<@lib.property | ||
name = "comment" | ||
type = "boolean" | ||
last = true | ||
desc = "Specifies if an comment exists for the task." /> | ||
|
||
</@lib.dto> | ||
</#macro> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
...t/src/main/java/org/camunda/bpm/engine/rest/dto/task/TaskWithAttachmentAndCommentDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH | ||
* under one or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information regarding copyright | ||
* ownership. Camunda licenses this file to you under the Apache License, | ||
* Version 2.0; you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.camunda.bpm.engine.rest.dto.task; | ||
|
||
import org.camunda.bpm.engine.task.Task; | ||
|
||
public class TaskWithAttachmentAndCommentDto extends TaskDto { | ||
|
||
private boolean hasAttachment; | ||
private boolean hasComment; | ||
|
||
public TaskWithAttachmentAndCommentDto() { | ||
} | ||
|
||
public TaskWithAttachmentAndCommentDto(Task task) { | ||
super(task); | ||
} | ||
public boolean getAttachment() { | ||
return hasAttachment; | ||
} | ||
public void setAttachment(boolean hasAttachment) { | ||
this.hasAttachment = hasAttachment; | ||
} | ||
|
||
public boolean getComment() { | ||
return hasComment; | ||
} | ||
|
||
public void setComment(boolean hasComment) { | ||
this.hasComment = hasComment; | ||
} | ||
|
||
public static TaskDto fromEntity(Task task) { | ||
TaskWithAttachmentAndCommentDto result = new TaskWithAttachmentAndCommentDto(task); | ||
|
||
result.hasAttachment = task.hasAttachment(); | ||
result.hasComment = task.hasComment(); | ||
return result; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.