public interface CockpitCommentService
| Modifier and Type | Method and Description |
|---|---|
CommentModel |
createItemComment(UserModel author,
ComponentModel component,
CommentTypeModel type,
java.util.Collection<ItemModel> items,
java.lang.String subject,
java.lang.String text)
Creates and returns a new item comment.
|
ReplyModel |
createReply(UserModel author,
AbstractCommentModel comment,
java.lang.String text)
Creates and returns a new comment reply.
|
java.util.List<CommentModel> |
getComments(UserModel user,
java.util.Collection<ComponentModel> components,
java.util.Collection<CommentTypeModel> types,
int offset,
int count)
Returns all comments in the specified domain components which are of the specified types and where
user is a participant. |
java.util.List<CommentModel> |
getCurrentUserComments()
Returns all comments in the default domain components which are of the default types and where the current user is
a participant.
|
java.util.List<CommentModel> |
getCurrentUserComments(Desktop desktop)
Returns all comments in the default domain components which are of the default types and where the current user is
a participant.
|
Query |
getCurrentUserCommentsQuery()
Get current user comments query.
|
java.util.List<ReplyModel> |
getDirectReplies(CommentModel comment,
int offset,
int count)
Returns all direct comment replies for the specified comment.
|
java.util.List<CommentModel> |
getItemComments(ItemModel item,
UserModel user,
java.util.Collection<ComponentModel> components,
java.util.Collection<CommentTypeModel> types,
int offset,
int count)
Gets comments.
|
Query |
getItemCommentsQuery(ItemModel item,
UserModel user,
java.util.Collection<ComponentModel> components,
java.util.Collection<CommentTypeModel> types)
Get item comments query.
|
java.util.List<ItemModel> |
getItemsFromCommentAttachments(AbstractCommentModel abstractComment)
Returns all attachments of the abstract comment
|
boolean |
isRead(TypedObject commentItem)
Return if the comment is read by the current user or not
|
void |
saveChangedComments(java.util.List<CommentModel> comments)
Saves only modified comments from comments list
|
void |
setRead(TypedObject commentItem,
boolean read)
Sets the read status of the specified commentItem for the current user
|
java.util.List<CommentModel> getItemComments(ItemModel item, UserModel user, java.util.Collection<ComponentModel> components, java.util.Collection<CommentTypeModel> types, int offset, int count)
item - the item that has been commented onuser - the authorcomponents - the related comment componentstypes - the comment typeoffset - the search offsetcount - the maximum number of comments to returnQuery getItemCommentsQuery(ItemModel item, UserModel user, java.util.Collection<ComponentModel> components, java.util.Collection<CommentTypeModel> types)
item - the item that has been commented onuser - the author or the watcher or the user assigned to the commentcomponents - the related comment componentstypes - the comment typeQuery getCurrentUserCommentsQuery()
ReplyModel createReply(UserModel author, AbstractCommentModel comment, java.lang.String text)
author - reply authorcomment - comment to reply totext - reply contentCommentModel createItemComment(UserModel author, ComponentModel component, CommentTypeModel type, java.util.Collection<ItemModel> items, java.lang.String subject, java.lang.String text)
author - comment authorcomponent - comment domain componenttype - comment typeitems - related itemssubject - comment subjecttext - comment contentjava.util.List<ReplyModel> getDirectReplies(CommentModel comment, int offset, int count)
comment - the commentoffset - search offsetcount - max hit countjava.util.List<CommentModel> getComments(UserModel user, java.util.Collection<ComponentModel> components, java.util.Collection<CommentTypeModel> types, int offset, int count)
user is a participant.user - comment participantcomponents - domain componentstypes - comment typesoffset - search offsetcount - max hit countjava.util.List<CommentModel> getCurrentUserComments()
java.util.List<CommentModel> getCurrentUserComments(Desktop desktop)
java.util.List<ItemModel> getItemsFromCommentAttachments(AbstractCommentModel abstractComment)
abstractComment - abstract comment to get attachments fromboolean isRead(TypedObject commentItem)
void setRead(TypedObject commentItem, boolean read)
commentItem - the commentItem (comment or reply)read - true, if commentItem should be marked as read, false otherwisevoid saveChangedComments(java.util.List<CommentModel> comments)
comments - list of commentsCopyright © 2018 SAP SE. All Rights Reserved.